Notification

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

درحال‌حاضر صفحه درخواستی به زبان شما دردسترس نیست. می‌توانید زبان دیگری را در انتهای صفحه انتخاب کنید یا بااستفاده از ویژگی ترجمه داخلی Google Chrome هر صفحه وبی را فوراً به زبان انتخابی‌تان ترجمه کنید.

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
10663940877804985510
true
Search Help Center
true
true
true
true
true
102097
false
false