REGEXTEST

REGEXTEST(text, pattern [,case_sensitivity])

Returns the boolean True or False depending if the regular expression matches any part of a text string.

textThe text string.
patternThe regular expression.
case_sensitivity(Optional) A logical value indicating whether to ignore the case:
0 = Case sensitive (default)
1 = Not case sensitive

REMARKS
* This is a Preview Function which means the signature and results may change before being officially released.
* This function was added in Microsoft 365.
* link - insider.microsoft365.com/en-us/blog/new-regular-expression-regex-functions-in-excel
* You can use the REGEXEXTRACT function to return the characters that match the pattern provided.
* You can use the REGEXREPLACE function to return the text string after replacing characters that match the pattern provided.
* This function was first released in June 2024.
* For the Microsoft documentation refer to support.microsoft.com

 A
1=REGEXTEST("Mat Taylor (123) 456-7890","^\([0-9]{3}\) [0-9]{3}-[0-9]{4}$") = True

1 - Check if this name and phone number matches the regular expression.

© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited Top