REGEXTEST
Checks whether any part of a text string matches a regular expression.
Syntax
REGEXTEST(text, pattern, [case_sensitivity])
Arguments
text: The text or reference to a cell containing the text to test.pattern: The regular expression to match against.case_sensitivity: [Optional]TRUE(default) matches case-sensitively. PassFALSEfor a case-insensitive match.
Example
REGEXTEST("Database", "^Data") → Returns TRUE
REGEXTEST("Database", "^data") → Returns FALSE (case-sensitive by default)
REGEXTEST("Database", "^data", FALSE) → Returns TRUE
REGEXTEST({{Claim Number}}, "[0-9]") → TRUE if the claim number contains any digit
Usage Notes:
- Returns
FALSEfor an invalid pattern instead of erroring out the formula. - Regular expressions are JavaScript-flavored (ECMAScript), which covers the vast majority of common patterns but is not identical to Excel's PCRE2 flavor for advanced features like some POSIX character classes.
- See REGEXEXTRACT to pull the matching text out instead of just testing for it, and REGEXREPLACE to replace it.