RegexpMatch
Returns True if a string matches a regular expression.
Syntax
RegexpMatch(string, pattern)
Function arguments:
- string (required): The string to search.
- pattern (required): The pattern to match within the string.
When the regular expression you want to use contains a slash, quotation or other special character, you will need to use a backslash () to escape the special character.
Notes
- When any of the arguments are
Null, the function returnsNull. - Regular expressions vary by database. Check the documentation of your data platform for syntax.
Examples
RegexpMatch([Name], "^[A-Z]{1}[a-z]+ [A-Z]{1}[a-z]+$")
Checks if a name starts with an uppercase letter, followed by one or more lowercase letters, and then has another uppercase letter followed by one or more lowercase letters.
RegexpMatch("123-45-6789", "[0-9]{3}-[0-9]{2}-[0-9]{4}")
Checks if a string matches the social security pattern 'xxx-xx-xxxx'. Returns True.
RegexpMatch([Phone Number], "\\(\\d{3}\\) \\d{3}-\\d{4}")
Checks if a string matches the phone number pattern '(xxx) xxx-xxxx'
RegexpMatch([Address], "^[0-9]+")
Checks if an address starts with numeric characters.

Updated 1 day ago
Related resources
