Trying to determine the best method to automatically remove HTML in all cells within a column in Google Sheets.
Example of cell data:
<span style="color:#0000FF">test</span>
I'd like to strip out all of the HTML and leave the plain text, automatically whenever a new row is added.
I'm not sure if using a regex in the cell as a formula or some type of script would be a better approach.
You could use REGEXREPLACE function:
This formula also can be converted into ArrayFormula:
This formula would populate down automatically. COUNTA(A:A) is number of rows in column [A] with your data
You can just use a Find and Replace dialog.
Find what:
</?\S+[^<>]*>
Replace with:
<empty string>
Search:
Specific range
='<SHEET_NAME>'!<COLUMN>:<COLUMN>
(e.g.'Copy of Sheet1'!A:A
)Make sure Search using regular expressions is checked. Then, click Replace all.
Here is a screen: