Syntax
=REGEXTEST(text, pattern, [case_sensitivity])Arguments
| Argument | Required | Description |
|---|---|---|
text | Required | The text to test |
pattern | Required | The regular expression |
case_sensitivity | Optional | 0 match case (default), 1 ignore case |
How to use REGEXTEST
REGEXTEST takes 2 required arguments and 1 optional argument. Type =REGEXTEST( in a cell and SheetsBat shows the arguments as you go. Optional arguments are shown in square brackets; leave them out to use their default.
Examples
Each result below was calculated by the SheetsBat formula engine.
=REGEXTEST("alpha123", "[0-9]+")Result =REGEXTEST("Hello", "^h")Result =REGEXTEST("Hello", "^h", 1)Result Related text functions
- PROPERCapitalizes the first letter of each word and makes the other letters lowercase.
- REGEXEXTRACTReturns the parts of a text that match a regular expression pattern.
- REGEXMATCHChecks whether any part of a text matches a regular expression pattern (case sensitive).
- REGEXREPLACEReplaces the parts of a text that match a regular expression pattern.
- REPLACEReplaces part of a text, given a start position and a number of characters, with other text.
- REPLACEBSame as REPLACE, counting bytes; without a double byte language set as default each character counts as one byte.
- REPTRepeats text a given number of times.
- RIGHTReturns the last characters of a text.
- RIGHTBSame as RIGHT, counting bytes; without a double byte language set as default each character counts as one byte.