Home › Functions › Text › REGEXTEST
fx
REGEXTEST
Text  ·  Since: Microsoft 365  ·  9 languages

The REGEXTEST function allows you to check whether any part of supplied text matches a regular expression ("regex"). It will return TRUE if there is a match and FALSE if there is not.

🌐 Translations

English REGEXTEST
Deutsch REGEXTEST
Français REGEXTEST
Español REGEXTEST
Italiano REGEXTEST
Português REGEXTEST
Nederlands REGEXTEST
Polski REGEXTEST
Русский REGEXTEST

📦 Availability

Excel versionAvailable
Excel 2007 ✗
Excel 2013 ✗
Excel 2019 ✗
Excel 2021 ✗
Microsoft 365 ✓
Translate a formula with this function
fx EN
fx DE

⌨ Syntax

REGEXTEST(text,pattern,[case_sensitivity])

Arguments

text (required) — The text or the reference to a cell containing the text you want to match against.
pattern (required) — The regular expression ("regex") that describes the pattern of text you want to match.
case_sensitivity (required) — Determines whether the match is case-sensitive. By default, the match is case-sensitive. Enter one of the following: 0: Case sensitive 1: Case insensitive

▶ Examples

=REGEXTEST(A2,"a")
=REGEXTEST(A2,"[a-z]")
=REGEXTEST(A2,"[A-Z]")

Related functions

Copied to clipboard