The RegExpTest function lets you evaluate a string against a regular expression to see if there is a match.
The RegExpTest function returns True if a regular expression matches any part of a string. See below for an example.
There are many web pages that help you test and debug your regular expressions, e.g. regex101.com.
In this example, the string in A4 is matched for the regular expression in A2. There is a match and the function returns TRUE.
This is what this RegExpTest function call will look like:
=RegExpTest(regex, string, flags)
The string is matched against the regular expression, controlled by the optional flags. The function and its results are modeled after the Exact function in Excel:
You may want to hide the cell containing the RegExpTest function from the user. You can hide the entire row or column by right-clicking on it and then selecting Hide in the menu. You can also hide the cell containing the RegExpTest function with the Utility widget.
Specify the regular expression you wish to match. Do not use any special delimiter for the regex, e.g. forward slash.
Specify the target string that you want to evaluate against the regular expression.
Specify the flags that control the evaluation of the regular expression (see below). The flags parameter is optional.
The way the function operates can be controlled by the flags below.
Global search, matches the pattern multiple times. Off by default.
Case insensitive search, both a and A match a. On by default.
Multi-line mode where ^ matches the start of the string and $ matches the end of the entire string. Without this, each line in the string is treated separately. On by default.
Short for single line; the . wildcard also matches newline characters. On by default.
Treats a pattern as a sequence of Unicode code points. On by default.
Perform a sticky search that matches starting at the current position in the target string. Off by default.