Notification

This article is about Looker Studio. For Looker documentation, visit https://cloud.google.com/looker/docs/intro.

Strona nie jest aktualnie dostępna w Twoim języku. Możesz wybrać inny język u dołu strony lub przetłumaczyć na wybrany język zawartość dowolnej strony, używając funkcji tłumaczenia dostępnej w 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 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

Czy to było pomocne?

Jak możemy ją poprawić?
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
3016937782820707550
true
Wyszukaj w Centrum pomocy
true
true
true
true
true
102097
false
false