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_CONTAINS

Returns true if a piece of text is a partial match for the regular expression.

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 values.

Notes

This function returns true if value X or any substring thereof matches for the pattern regular_expression. For example, if the value of Field is "ABC123":

REGEXP_CONTAINS(Field, 'A') returns true.
REGEXP_CONTAINS(Field, 'A.*') returns true.
REGEXP_CONTAINS(Field, 'AC') returns false.

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.*).

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.

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
18128858670027964447
true
Wyszukaj w Centrum pomocy
true
true
true
true
true
102097
false
false