Help Centre › Functions & Formulas
For a full list of available calculation functions, please read What calculation functions are supported.
This article describes the formula syntax and usage of the REGEXTEST function.
Description
Tests whether a text string matches a regular expression.
Syntax
REGEXTEST(text, regular_expression)
The REGEXTEST function has the following arguments:
- text - Required. The text to test against the regular expression.
- regular_expression - Required. The regular expression to match against text.
Remarks
- If there is no match, REGEXTEST returns FALSE.
- The regular expression must match the entire text string. If you want to test only part of the text, use parentheses in the regular expression to capture the part you want to test.
Example
| Formula | Description | Result |
| =REGEXTEST("abc123", "[0-9]+") | Tests if "abc123" contains any digits. | TRUE |
Errors
For a full list of formula errors, please read Formula errors.