Notification

This Help Center is moving to Cloud. Learn more about the migration.

Stranica koju ste zatražili trenutačno nije dostupna na vašem jeziku. Možete odabrati neki drugi jezik pri dnu stranice ili u trenu prevesti bilo koju web-stranicu na željeni jezik pomoću ugrađene značajke Google Chromea za prijevod.

REGEXP_MATCH

Returns true if the target value exactly matches the regular expression pattern.

Sample usage

REGEXP_MATCH(name, '[a-zA-Z].*')

Syntax

REGEXP_MATCH(X, regular_expression)

Parameters

  • X - a field or expression to evaluate.
  • regular_expression - a regular expression.

Returns

The REGEXP_MATCH function returns Boolean data type values.

Notes

Looker Studio uses the RE2 expression syntax. For more details, see Regular Expressions in Looker Studio.

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.

Examples

Example formula Input Output
REGEXP_MATCH(field_expression, 'A') ABC123 false
REGEXP_MATCH(field_expression, 'A.*') ABC123 true
REGEXP_MATCH(name, '[a-zA-Z].*') Sam true
REGEXP_MATCH(name, '[a-zA-Z].*') $am false
REGEXP_MATCH(country, '(USA|Canada|Mexico)') Canada true
REGEXP_MATCH(country, '(USA|Canada|Mexico)') Brazil false

Was this helpful?

How can we improve it?
true
What's new in Looker Studio?

Learn about new features and recent changes. Looker Studio release notes live on Google Cloud.

Search
Clear search
Close search
Main menu
12739092577054981588
true
Search Help Center
true
true
true
true
true
102097
false
false