REGEXTEST
Check whether text contains a match for a regular-expression pattern.
Syntax
=REGEXTEST(text, pattern, [case_sensitivity])Worked example
Check that the entire code has the expected prefix and exactly three digits.
=REGEXTEST("LOT-942","^LOT-[0-9]{3}$")Result TRUE
Microsoft documentation
Check the arguments, supported editions and behavior of this function in Microsoft’s reference.
Microsoft referenceDay 108 | REGEXTEST Formula | MS Excel 365 | 365 Formulas
Practice REGEXTEST
Check that the entire code has the expected prefix and exactly three digits.
| A | B | |
|---|---|---|
| 1 | ||
| 2 | ||
| 3 |
Show example formula
=REGEXTEST(B2,B3) Lesson quiz
Answer three questions to see your level in this lesson.
