Google Sheets - Regex Find and Replace

date-created:: 2023-08-15

#regex
Google Sheets allows regex in find and replace. This is extremely helpful in turning embedded newlines (\n) into HTML
for CSV or TSV files for Anki.

It's important to do this find and replace to recode newlines as HTML before downloading the file as CSV and TSV. Without this step, all those newlines will turn into simple spaces, losing their newlineness.

Before

_attachments/_OB/Screen Shot 2023-08-15 at 22.03.27.png

Applying regex

_attachments/_OB/Screen Shot 2023-08-15 at 22.04.34.png

After

_attachments/_OB/Screen Shot 2023-08-15 at 22.09.08.png