Stay organized with collections
Save and categorize content based on your preferences.
Sample usage
REGEXP_CONTAINS(Page, 'home')
Syntax
REGEXP_CONTAINS( X, regular_expression )
Parameters
X - a field or expression to evaluate.
regular_expression - a regular expression.
Returns
The REGEXP_CONTAINS function returns Boolean data type values.
Examples
Example formula
Input
Output
REGEXP_CONTAINS(Field, 'A')
ABC123
true
REGEXP_CONTAINS(Field, 'A.\*')
ABC123
true
REGEXP_CONTAINS(Field, 'AC')
ABC123
false
Notes
REGEXP_CONTAINS differs from the similar REGEXP_MATCH function, which will only match the entire value by default. Thus, REGEXP_CONTAINS(field,"pattern") is functionally equivalent to REGEXP_MATCH(field,".*pattern.*").
Note that patterns containing escape characters such as \ may require additional escaping in Looker Studio, which can be avoided with the use of raw string literals.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-22 UTC."],[],[],null,["# REGEXP_CONTAINS\n\nSample usage\n------------\n\n`REGEXP_CONTAINS(Page, 'home')`\n\nSyntax\n------\n\n`REGEXP_CONTAINS( `\u003cvar translate=\"no\"\u003eX\u003c/var\u003e`, `\u003cvar translate=\"no\"\u003eregular_expression\u003c/var\u003e` )`\n\n### Parameters\n\n- *\u003cvar translate=\"no\"\u003eX\u003c/var\u003e* - a field or expression to evaluate.\n\n- *\u003cvar translate=\"no\"\u003eregular_expression\u003c/var\u003e* - a regular expression.\n\n### Returns\n\nThe `REGEXP_CONTAINS` function returns **Boolean** data type values.\n\n### Examples\n\n### Notes\n\n`REGEXP_CONTAINS` differs from the similar [`REGEXP_MATCH`](/looker/docs/studio/regexpmatch) function, which will only match the *entire* value by default. Thus, `REGEXP_CONTAINS(field,\"pattern\")` is functionally equivalent to `REGEXP_MATCH(field,\".*pattern.*\")`.\n\nLooker Studio uses the RE2 expression syntax. For more details, see [Regular Expressions in Looker Studio](/looker/docs/studio/regular-expressions-in-looker-studio).\n\nNote that patterns containing escape characters such as `\\` may require additional escaping in Looker Studio, which can be avoided with the use of [raw string literals](/looker/docs/studio/literals).\n\nRelated resources\n-----------------\n\n- [Calculated fields](/looker/docs/studio/about-calculated-fields)\n- [Looker Studio function list](/looker/docs/studio/function-list)"]]