Text
REGEXTEST
TRUE if the text matches a regular expression. Case: 0 is case-sensitive, 1 is not.
Syntax
REGEXTEST(text, pattern, [case_sensitivity])Example: =REGEXTEST(A2,"^\d{12}$")
Available in: Microsoft 365 only
Try it
A tiny spreadsheet with example data. Edit the formula or any number and see the result.
Formula in D2: =REGEXTEST(A5,"^SKU-\d{4}-\d{4}$")
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Text | Other | Result | |
| 2 | Alice Johnson | alice johnson | TRUE | |
| 3 | alice@shop.com | ALICE@shop.com | ||
| 4 | extra spaces | |||
| 5 | SKU-2026-0415 | |||
| 6 | iced coffee, tea, sugar | |||
| 7 | Order 417 shipped |
Result in D2: TRUE