replace_html_tags(string, replacement)
Replaces HTML tags in a <string> with the specified <replacement>.
CREATE OR REPLACE FUNCTION `justfunctions.eu.replace_html_tags`(`string` string, `replacement` string)
RETURNS string AS (TRIM(REGEXP_REPLACE(string, r"<[^>]*>", replacement)))
OPTIONS ( description = '''Replaces HTML tags in a <string> with the specified <replacement>.''')
Example
SELECT `justfunctions.eu.replace_html_tags`("<div class=\'test\'>hello world<a href=\'#\'>hello world<\a><\\div>", " ")
hello world hello world