REGEXTEST in ONLYOFFICE: Pattern Matching and Code Validation
Check identifier formats and matching substrings with REGEXTEST in ONLYOFFICE, including case sensitivity, anchors and reproducible TRUE/FALSE examples.
Verification status: Two specified case-sensitivity examples were checked in ONLYOFFICE Desktop Editors Community 10.0.0.169 on Linux. Other patterns, platforms and application builds are outside those native observations. How formula examples are checked
Quick answer: =REGEXTEST("AB-204","[0-9]+") returns TRUE because the text contains a run of digits. REGEXTEST answers a yes/no question; use REGEXEXTRACT when you need the matching text and REGEXREPLACE when you need to change it.
Availability and version history
- Introduced: The Desktop Editors and Docs histories explicitly add REGEXTEST in 9.3.0, dated February 25, 2026.
- Availability: Listed in the current function reference; two case-sensitivity examples were also tested in Desktop Editors Community 10.0.0.169 on Linux.
- Scope: Desktop test results do not establish identical behavior in every Docs deployment, mobile client or older build. No retirement endpoint is established.
- Checked: October 14, 2026. Official documentation, independent pattern checks and the two specifically identified native cases below.
Syntax and case sensitivity
=REGEXTEST(text, pattern, [case_sensitivity])
text and pattern are required. They can be quoted text literals or references to cells containing text. The optional third argument is 0 for case-sensitive matching, the default, or 1 for case-insensitive matching. Use these integer values rather than guessing what other numbers mean.
The function looks for a match anywhere in the text. A successful match returns the logical value TRUE, and no match returns FALSE. Those are Boolean results, not the words “TRUE” and “FALSE” stored as ordinary text.
For example, the literal formulas below were recalculated in Desktop Editors Community 10.0.0.169:
| Formula | Native result |
|---|---|
=REGEXTEST("ABC","abc") |
FALSE |
=REGEXTEST("ABC","abc",1) |
TRUE |
Case-insensitive matching is not a promise of every language-specific equivalence. These tests establish the stated ASCII example only.
A reproducible identifier check
In a blank worksheet, put Input, Contains three digits, and Matches code shape in A1:C1. Enter these text values without enclosing quote characters:
| Row | A: Input | Expected B | Expected C |
|---|---|---|---|
| 2 | AB-204 | TRUE | TRUE |
| 3 | ab-204 | TRUE | FALSE |
| 4 | AB-20 | FALSE | FALSE |
| 5 | XAB-204 | TRUE | FALSE |
| 6 | AB-204X | TRUE | FALSE |
| 7 | XY-007 | TRUE | TRUE |
Enter =REGEXTEST(A2,"[0-9]{3}") in B2 and fill through B7. Enter =REGEXTEST(A2,"^[A-Z]{2}-[0-9]{3}$") in C2 and fill through C7.
The second pattern describes two uppercase ASCII letters, a hyphen and three ASCII digits. ^ marks the beginning, {2} and {3} set repetition counts, and $ marks the ending. Without the anchors, a matching substring inside a longer code can pass, as rows 5 and 6 demonstrate.
These are independently checked, clean single-line examples. Imported line endings and unusual Unicode characters need their own checks; a visual resemblance to a letter or digit does not make a character part of the explicit ranges A–Z or 0–9.
Turn a test into a review label
Put Review label in D1. In D2 enter:
=IF(C2,"Shape OK","Review")
Fill through D7. The expected labels are Shape OK, Review, Review, Review, Review, Shape OK. IF makes the outcome readable while preserving the original input and the Boolean check.
“Shape OK” deliberately means only that this pattern matched. It does not prove that the code exists in a master list, identifies the correct item or is authorized for a transaction. Combine a format check with the appropriate lookup or business rule when those questions matter.
If lowercase codes are allowed, put =REGEXTEST(A2,"^[A-Z]{2}-[0-9]{3}$",1) in E2 and fill through E7. Rows 2, 3 and 7 now match. Decide whether to accept case differences before changing the rule, rather than treating every failed test as bad data.
Pattern symbols are different from spreadsheet wildcards
ONLYOFFICE’s official entry lists the basic regex tokens. A few distinctions prevent common mistakes:
[0-9]matches one ASCII digit;[0-9]+matches one or more consecutive digits..means a character, not a literal period. For a period, a class such as[.]makes the intention visible.*repeats the preceding expression zero or more times. It is not a standalone “match anything” spreadsheet wildcard.- Parentheses group parts of a pattern; square brackets describe a character class.
For a separate check, put version 2.3 in A10 and version 2x3 in A11. In B10 enter =REGEXTEST(A10,"2[.]3") and fill to B11. Expect TRUE, FALSE. The unescaped pattern 2.3 would match both of these simple inputs.
Use short, explicit patterns suited to your data. A very permissive pattern can produce a reassuring TRUE for the wrong reason.
Errors and practical limits
An invalid pattern is different from a valid pattern that finds no match. Do not turn every formula error into FALSE without keeping a way to inspect invalid rules. Check unmatched brackets, quotation marks and the referenced pattern cell first.
English examples use comma argument separators. Adapt separators through the local formula editor if your settings differ; punctuation inside the quoted pattern is part of the pattern, not an argument separator.
Do not assume complete compatibility with another product’s regex dialect. The inspected official implementation uses JavaScript regular expressions, with product-specific handling around them. These examples intentionally avoid advanced dialect features and zero-width matching edge cases.
For the next step, see REGEXEXTRACT to return matching text, or REGEXREPLACE to replace matches. Keep validation, extraction and rewriting as separate columns when tracing a data-cleaning workflow.