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
| Argument | Required | Meaning |
|---|---|---|
| text | Yes | Text to examine or process. |
| pattern | Yes | A regular expression describing the text to match; Excel uses PCRE2 syntax. |
| case_sensitivity | No | Controls whether uppercase and lowercase characters are distinguished. |
Try REGEXTEST
Check a code pattern and its length for every row
=HSTACK(REGEXTEST(A2:A5,"^[A-Za-z]{2}-[0-9]{4}$"),LEN(A2:A5)=7)REGEXTEST is evaluated per source row. The pinned browser rejects the final-LF source in both columns. PCRE2 end-anchor behavior can differ, so the explicit length condition states the seven-character contract independently. Native Excel and full PCRE2 behavior remain unverified.
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 · inside HSTACK
=HSTACK(REGEXTEST(A2:A5,"^[A-Za-z]{2}-[0-9]{4}$"),LEN(A2:A5)=7)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.