Zoho Sheet REGEXMATCH Function: Patterns, Anchors and Case Modes
Validate text with complete ASCII pattern fixtures, explicit case sensitivity and clear distinctions between containment and full-field matching.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
REGEXMATCH tests whether text contains a match for a regular-expression pattern. It returns a Boolean result, rather than the matching characters or their position. Zoho’s explicit =REGEXMATCH("Hello 123";"[0-9]+") example is TRUE because the text contains a run of digits, even though the entire text is not numeric.
Availability and verification
The official REGEXMATCH reference was retrieved October 15, 2026. Zoho’s release history announces REGEXMATCH, REGEXEXTRACT and REGEXREPLACE in January 2025. That establishes an announcement month, not a numbered first build or proof that every currently documented optional argument existed on that date. The last functioning version is unknown: current documentation is not a last-working-build test. The web entry does not establish mobile or offline-client parity.
The worked results and constraints below were independently checked. No native Zoho session was executed. Examples follow the help’s semicolon formula notation even where its syntax heading uses commas; verify the actual editor’s accepted separators. All datasets are fictional and fully specified rather than reconstructed from hidden embedded cells.
Syntax and case controls
REGEXMATCH(text; regular_expression; [case_sensitivity])
text is the input string and regular_expression is the pattern. Optional case_sensitivity defaults to 0, meaning case-sensitive. Use 1 for case-insensitive matching. This numeric switch should not be confused with a Boolean argument whose TRUE necessarily means sensitive.
The examples use a deliberately small ASCII regex subset: literal letters, character classes, repetition and start/end anchors. The entry does not identify a regex engine or guarantee Unicode classes, lookbehind, backreferences or multiline behavior. These controls do not establish full compatibility with another spreadsheet or programming language.
Complete identifier-validation worksheet
Put Label in A1 and Valid_code in B1. Enter the following six strings in A2:A7. In B2 enter =REGEXMATCH(A2;"^[A-Z]{2}-[0-9]{3}$";0) and fill down.
| Row | Input text | Independent expected Boolean |
|---|---|---|
| 2 | AB-123 | TRUE |
| 3 | AB-12 | FALSE |
| 4 | ab-123 | FALSE |
| 5 | AB-1234 | FALSE |
| 6 | prefix AB-123 | FALSE |
| 7 | XY-009 | TRUE |
The start and end anchors require the whole single-line string to follow this pattern: two uppercase ASCII letters, a hyphen and three digits. The leading zeros in XY-009 are part of the text identifier; the function does not convert them into a number.
The controls contain no newline characters. Do not extrapolate this table into a claim about how every regex anchor handles a final newline or a multiline input in Zoho’s engine.
Example: containment versus full-string validation
=REGEXMATCH("prefix AB-123 suffix";"[A-Z]{2}-[0-9]{3}";0) independently gives TRUE. Adding the anchors, "^[A-Z]{2}-[0-9]{3}$", gives FALSE for that same input.
Neither pattern is universally better. The unanchored form finds a code inside a longer note; the anchored form checks a field intended to contain only a code. Choose the pattern from the field’s purpose rather than treating any TRUE result as complete validation.
For an explicit case comparison, =REGEXMATCH("ab-123";"^[A-Z]{2}-[0-9]{3}$";1) has independent target TRUE, while mode 0 gives FALSE. The test does not rewrite the lowercase text into uppercase.
Advanced: make the accepted alphabet explicit
The pattern "^[A-Za-z0-9_-]+$" allows one or more ASCII letters, digits, underscores or hyphens. For inputs batch_07, Batch-07, batch 07 and batch/07, independent expectations are TRUE, TRUE, FALSE and FALSE.
This is a fictional token policy, not a universal rule for filenames, passwords or account identifiers. The class excludes spaces and slashes intentionally. It also excludes accented letters; a claim of internationalized validation would require different requirements and engine-specific tests.
To accept exactly three decimal digits, use "^[0-9]{3}$". Inputs 007, 70 and 7.0 have targets TRUE, FALSE and FALSE. A number formatted to display leading zeros is not automatically the same stored text as the string 007.
Advanced: retain both the raw field and the result
Keep the original input column alongside the Boolean flag. A failed pattern test does not explain whether the problem is case, length, an unexpected separator or extra text. For the six-row code fixture, there are two TRUE results and four FALSE results.
If the intended policy changes to allow lowercase codes, changing only case_sensitivity from 0 to 1 makes the ab-123 row pass, bringing the fixture to three TRUE results. The shorter, longer and prefixed fields still fail. This is a reproducible regression check for a narrowly defined policy change.
Errors and troubleshooting
The help’s error table mentions delimiters and instance values, although REGEXMATCH has no delimiter or instance argument. Those generic rows are not treated as proof that an ordinary nonmatch raises #N/A! rather than producing a Boolean FALSE.
Malformed-pattern errors, invalid case modes, blank/text coercions and extreme pattern performance were not native-tested. Keep patterns simple, test both matching and nonmatching controls, and inspect quotes and backslashes if the formula fails to parse. Matching a pattern does not establish the truth or safety of the text’s contents.