Calculated fields

Looker Studio calculated field – Remove HTML tags from a text field

The Looker Studio calculated field below cleans a text field removing any HTML tag.


  • Explanations of the formula
    • Any HTML tag starts with “<” and ends with “>”
    • We create a regular expression (regex) corresponding to this substring
    • And we take advantage of REGEXP_REPLACE function to replace all the matching occurrences of this substring with an empty string
  • Input
    • Any text dimension
  • Output
    • A text-typed dimension without HTML tag
  • Used functions

Text dimension without HTML tag 
REGEXP_REPLACE(My text field, '(<[^>]+>)','')