Skip to main content
← All functions

REGEXTEST function

Test whether text contains a regular-expression match.

This reference covers the native Excel function. Its required application features or connected services are not implemented by the local worksheet engine. Check the linked Microsoft documentation for availability and complete option values.

Syntax

REGEXTEST(text, pattern, [case_sensitivity])

Square brackets indicate optional arguments.

Arguments

ArgumentRequiredMeaning
textYesText to examine or process.
patternYesA regular expression describing the text to match; Excel uses PCRE2 syntax.
case_sensitivityNoControls whether uppercase and lowercase characters are distinguished.

Try REGEXTEST

Check the whole shape of a reference code

=REGEXTEST(A2,"^INV-[0-9]{4}$")

The anchors require the whole text to be INV- followed by exactly four digits. This pattern uses syntax shared by Excel PCRE2 and the browser engine; passing it does not establish support for every PCRE2 feature.

Inspect the current formula

Read its written arguments or observe actual operation values in a separate local calculation. This action neither applies a draft nor grades an answer.

Read the formula, one argument at a time

Explore the written function calls and their inputs. The calculation result belongs to the complete formula.

REGEXTEST · top-level call

=REGEXTEST(A2,"^INV-[0-9]{4}$")

1 / 2 · text

Text to examine or process.

REGEXTEST reference ↗

Follow the cells behind a result

Read explicit local references and helper formulas using a separate calculation. Your draft stays in this field; the worksheet and practice checks do not change.

The worksheet runs locally. Published checks apply to the supplied example only. Native Excel and Google Sheets compatibility remain unverified.

Practice a complete task

Reference and compatibility

Original SheetTutor reference notes / Microsoft documentation. Calculation checks cover the supplied examples only. The browser worksheet does not implement every Excel feature, external service or connected data type.