TextMicrosoft 365

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 reference

Search ExcelTutor