FN-REGEXTEST-001: In REGEXTEST, \w takes combining marks, dot refuses CR, and case folding reaches into ranges
Quirk · measured · recorded 2026-11-04
Some regular expression details in REGEXTEST differ from a plain reading. \w matches a combining mark (U+0301) and connector punctuation (U+203F), so it is not limited to letters, digits and underscore. Dot does not match CR as well as LF: REGEXTEST("a"&CHAR(13)&"b","a.b") is FALSE. \d does not match a Han character. With case_sensitivity 1, folding applies inside a character class range: É matches [é-é] and Σ matches [α-ω]. It also covers the non-ASCII partners of ASCII letters: the Kelvin sign U+212A matches k and long s U+017F matches s. ß matches its capital U+1E9E, and a Deseret letter above U+FFFF matches its other case.
| Call and input route | Inputs | Excel | Correct value | Recorded in |
|---|---|---|---|---|
REGEXTEST(A1, A2, 1)cell-value2 | text: Épattern: [é-é]case_sensitivity: 10x3ff0000000000000 | TRUE | — | Excel 16.0.20527.20088, Windows 64-bit, AMD Ryzen 7 4800H, workbook compatibility version 2 |
REGEXTEST(A1, A2, 1)cell-value2 | text: Σpattern: [α-ω]case_sensitivity: 10x3ff0000000000000 | TRUE | — | Excel 16.0.20527.20088, Windows 64-bit, AMD Ryzen 7 4800H, workbook compatibility version 2 |
REGEXTEST(A1, A2, 0)cell-value2 | text: ́pattern: \wcase_sensitivity: 00x0000000000000000 | TRUE | — | Excel 16.0.20527.20088, Windows 64-bit, AMD Ryzen 7 4800H, workbook compatibility version 2 |
REGEXTEST(A1, A2, 0)cell-value2 | text: ‿pattern: \wcase_sensitivity: 00x0000000000000000 | TRUE | — | Excel 16.0.20527.20088, Windows 64-bit, AMD Ryzen 7 4800H, workbook compatibility version 2 |
REGEXTEST(A1, A2, 0)cell-value2 | text: a, CR (U+000D), bpattern: a.bcase_sensitivity: 00x0000000000000000 | FALSE | — | Excel 16.0.20527.20088, Windows 64-bit, AMD Ryzen 7 4800H, workbook compatibility version 2 |
REGEXTEST(A1, A2, 1)cell-value2 | text: Kpattern: kcase_sensitivity: 10x3ff0000000000000 | TRUE | — | Excel 16.0.20527.20088, Windows 64-bit, AMD Ryzen 7 4800H, workbook compatibility version 2 |
REGEXTEST(A1, A2, 1)cell-value2 | text: ſpattern: scase_sensitivity: 10x3ff0000000000000 | TRUE | — | Excel 16.0.20527.20088, Windows 64-bit, AMD Ryzen 7 4800H, workbook compatibility version 2 |
Basis: 12 recorded REGEXTEST readings, in a workbook at compatibility version 2.
Inferred: The readings cover the characters named here. That \w follows the Unicode Mn and Pc categories in general, and that ranges fold by simple case folding in general, is inferred.
Open: Reversed or very wide caseless ranges, and other newline characters, have not been read.
Evidence and capture sources
- DnaCalc · apps/dna-onecalc/tests/acceptance.rs ae13ca181bc1d5e3c9e266f26a856ba634707d8e · recorded answers pinned
- DnaCalc · crates/calc-func/tests/captures/fn3_questions/REGEXTEST.reading.json 2d0eddcac86413014643af81d646581d54ba57bc · 12 recorded readings
- DnaCalc · crates/calc-func/tests/captures/fn3_questions/REGEXTEST.reading.json 2d0eddcac86413014643af81d646581d54ba57bc · fn3-regextest-001
- DnaCalc · crates/calc-func/tests/captures/fn3_questions/REGEXTEST.reading.json 2d0eddcac86413014643af81d646581d54ba57bc · fn3-regextest-003
- DnaCalc · crates/calc-func/tests/captures/fn3_questions/REGEXTEST.reading.json 2d0eddcac86413014643af81d646581d54ba57bc · fn3-regextest-005
- DnaCalc · crates/calc-func/tests/captures/fn3_questions/REGEXTEST.reading.json 2d0eddcac86413014643af81d646581d54ba57bc · fn3-regextest-006
- DnaCalc · crates/calc-func/tests/captures/fn3_questions/REGEXTEST.reading.json 2d0eddcac86413014643af81d646581d54ba57bc · fn3-regextest-007
- DnaCalc · crates/calc-func/tests/captures/fn3_questions/REGEXTEST.reading.json 2d0eddcac86413014643af81d646581d54ba57bc · fn3-regextest-009
- DnaCalc · crates/calc-func/tests/captures/fn3_questions/REGEXTEST.reading.json 2d0eddcac86413014643af81d646581d54ba57bc · fn3-regextest-010