Skip to main content
REGEX_MATCH

Checks if a text string matches a specified regular expression pattern

Updated over a week ago

Description

The REGEX_MATCH() function is used to determine if a text string matches a specific regular expression pattern. This function is valuable for pattern validation and identifying occurrences of a particular pattern within text data.

Syntax

REGEX_MATCH(text, “pattern")

Output

boolean

Variables

  1. text: The input text string you want to check for a pattern match.

  2. pattern: The regular expression pattern to be used for the match check.

Example

REGEX_MATCH(`Phone Numbers`,"^[+]?[0-9]?[-. ]?\(?[0-9]{3}\)?[-. ]?[0-9]{3}[-. ]?[0-9]{4}$")

ID

Phone Numbers

REGEX_MATCH

1

(555) 555-5555

true

2

123-456-7890

true

3

800-555-1234 ext. 567

4

+1 (123) 456-7890

Did this answer your question?