FormulaCamp
Completed
← All functions
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}$")

Example spreadsheet for REGEXTEST
ABCD
1TextOtherResult
2Alice Johnsonalice johnsonTRUE
3alice@shop.comALICE@shop.com
4 extra spaces
5SKU-2026-0415
6iced coffee, tea, sugar
7Order 417 shipped
Result in D2: TRUE
Practice this in a lesson: REGEX Functions

More in Text