← All functions

REGEXEXTRACT

Quirk found

Category: Text · Last tested 2026-09-01

Real compatibility results for the REGEXEXTRACT function: executed in Excel for the web, Google Sheets and LibreOffice Calc, with desktop Excel behavior from Microsoft’s official documentation (we do not run desktop Excel — Excel for the web is a different application and is executed separately). Syntax and links to that documentation are below.

Support matrix

EngineDocumentedLive-testedVerdict
Excel (desktop)Yes No — documented only n/a
Excel for the web— Yes (recalc, 2026-09-01) Quirk found
Google SheetsYes Yes (Drive import, 2026-08-31) Quirk found
LibreOffice CalcNo Yes (25.8.7.3, 2026-08-31) Unsupported (not recognized)

LibreOffice version history

We executed the same test cases under each LibreOffice release to show exactly when REGEXEXTRACT’s support changed — not documentation claims, real results.

LibreOffice versionVerdictTested
24.2.0.3 Unsupported (not recognized) 2026-08-31
24.8.7.2 Unsupported (not recognized) 2026-08-31
25.2.0.3 Unsupported (not recognized) 2026-08-31
25.8.7.3 Unsupported (not recognized) 2026-08-31

Why isn't REGEXEXTRACT working in LibreOffice?

LibreOffice Calc does not implement REGEXEXTRACT as of 25.8.7.3 — in our executed tests it returns a #NAME? (unrecognized function) error. This is not a typo or a settings problem, and saving the file as .xlsx does not change it: the function simply isn’t available yet. The same formula is documented for Excel and documented for Google Sheets. Watch the LibreOffice version support page — we re-run every test on each new release, so it will flip to Supported here as soon as it lands.

Why isn’t REGEXEXTRACT working in Google Sheets?

REGEXEXTRACT runs in Google Sheets, but our executed cases show it does not match Excel’s documented behavior on every input (the failing cases are listed on this page). If a formula that behaves one way in Excel gives you a different answer in Sheets, compare your usage against those cases before assuming your data is wrong.

Discovered quirks

Executed test cases

Excel for the web (executed 2026-09-01 via OneDrive recalculation)

These values come from Excel for the web, not from desktop Excel. They are two different implementations of the calculation engine, and this run measured only the web one: the corpus was uploaded to OneDrive as .xlsx, recalculated by Excel for the web on open, and downloaded again for readback. Excel for the web is a rolling service with no pinnable version, so the run is identified by its date. Where a value here disagrees with the Expected column — which is Microsoft’s documentation of the desktop product — we cannot tell you whether the web engine diverges from the desktop one or the documentation is wrong about both, because we do not run desktop Excel.

FormulaDescriptionResultExpectedVerdict
=REGEXEXTRACT(A2,"[A-Z][a-z]+") Microsoft's documented example: the first match of a capitalised-word pattern Dylan Dylan
Provenance

Microsoft's Example 1 is exactly this: the data "DylanWilliams" with the pattern "[A-Z][a-z]+", described as "Extract names based on capital letters". DERIVATION: the pattern matches one upper-case letter followed by one or more lower-case letters; scanning from the left, the first such run in "DylanWilliams" is "Dylan" (it stops at the W, which is not in [a-z]). With return_mode omitted the documented behaviour is "0: Return the first string that matches the pattern", so the answer is the single string "Dylan". REGEX FLAVOUR, AS DOCUMENTED: "All regular expressions for this function, as well as REGEXTEST and REGEXREPLACE use the PCRE2 'flavor' of regex" -- Microsoft's own sentence, printed on all three REGEX pages. This corpus's patterns are deliberately confined to character classes, quantifiers and anchors, which mean the same thing in PCRE2, in RE2 and in the ICU flavour LibreOffice's own REGEX function documents, so a difference between engines here is a difference about the FUNCTION, not about dialect corners. Microsoft's page was re-read live on 2026-08-31 at https://support.microsoft.com/en-us/excel/functions/regexextract-function (the /en-us/office/<name>-function-<guid> path was returning Microsoft's 'Sorry, the page you're looking for can't be found' body throughout this batch, and the working path serves an 87 KB stub about half the time, so pages were fetched with retries until the payload exceeded 150 KB). EXECUTED RESULT -- GENUINELY ABSENT: LibreOffice returns #NAME? on all four pinned builds (24.2.0.3, 24.8.7.2, 25.2.0.3, 25.8.7.3), which agree case for case, under all four spellings probed before the run (plain, _xlfn., COM.MICROSOFT. and ORG.OPENOFFICE.). None of the three Excel REGEX functions exists in any LibreOffice release tested here. LibreOffice is not without regular expressions -- its own REGEX(Text; Expression [; [Replacement] [; Flags|Occurrence]]) is documented and works -- but it is a different function with a different name, a different argument shape and a different flavour (ICU, against the PCRE2 Microsoft's pages name), so a workbook using REGEXTEST or REGEXEXTRACT does not open and run; it has to be rewritten.

Matched
=COUNTA(REGEXEXTRACT(A2,"[A-Z][a-z]+",1)) The same pattern with return_mode 1, counted rather than indexed 2 2
Provenance

Microsoft's Example 1 runs the same data a second time with return_mode 1, documented as "1: Return all strings that match the pattern as an array". "DylanWilliams" contains exactly two capitalised words, so the array has two elements. The result is wrapped in COUNTA DELIBERATELY: Microsoft's page shows the array only as a screenshot and never states whether it spills down a column or across a row, so asserting INDEX(...,2) would be asserting an orientation this corpus cannot source. COUNTA is orientation-blind and still distinguishes return_mode 1 from return_mode 0, which returns a single string and would count 1. EXECUTED RESULT -- READ THIS ONE CAREFULLY: LibreOffice returns 1 on all four pinned builds (24.2.0.3, 24.8.7.2, 25.2.0.3, 25.8.7.3), which agree case for case, not #NAME?. That is NOT a partially-working REGEXEXTRACT. COUNTA counts non-empty cells, and an error value is not empty, so COUNTA(#NAME?) is 1: the wrapper this case uses to avoid asserting an array orientation also swallows the #NAME? underneath it. The other four cases in this file show the raw #NAME?, and the function is absent under all four spellings probed. The count of 1 here is an artefact of the wrapper, not evidence of anything the engine computed.

Matched
=REGEXEXTRACT("2024-08-31","-([0-9]{2})-",2) return_mode 2, which returns the capturing groups of the first match 08 08
Provenance

Microsoft documents return_mode "2: Return capturing groups from the first match as an array" and explains: "Capturing groups are parts of a regex pattern surrounded by parentheses '(...)'. They allow you to return separate parts of a single match individually." The pattern here has exactly ONE group, so the returned array has one element and coerces to the scalar string "08" -- chosen that way so the case tests the group extraction without depending on how a multi-element array is laid out. The match itself is "-08-" and the group inside it is "08". Note the documented remark that "REGEXEXTRACT always return text values" (Microsoft's own grammar): the expected value is the two-character STRING "08", not the number 8.

Matched
=REGEXEXTRACT("abcDEF","[A-Z]+",0,1) The documented case_sensitivity argument set to case-insensitive abcDEF abc
Provenance

Microsoft documents case_sensitivity as "0: Case sensitive" (the default) and "1: Case insensitive". With matching made case-insensitive, [A-Z]+ also matches lower-case letters, so the FIRST match in "abcDEF" is the leading run "abc" -- not "DEF", which is what the same call returns with the default sensitivity. The two readings give different answers on the same string, which is what makes this a real test of the argument rather than a decoration.

Mismatch
=REGEXEXTRACT("abc","[0-9]+") A pattern that matches nothing #N/A #N/A
Provenance

There is no digit in "abc", so nothing matches. #N/A -- "not available" -- is Excel's error for a lookup that found nothing, and it is what this function family returns on no match; the value is asserted here so that an engine returning an empty string, a zero or #VALUE! instead is recorded as different.

Matched

Google Sheets (executed 2026-08-31 via Drive import)

Google Sheets is a rolling service with no pinnable version, so this run is identified by its date. The corpus was imported to Drive as .xlsx, recalculated by Sheets, and exported back for readback.

FormulaDescriptionResultExpectedVerdict
=REGEXEXTRACT(A2,"[A-Z][a-z]+") Microsoft's documented example: the first match of a capitalised-word pattern Dylan Dylan
Provenance

Microsoft's Example 1 is exactly this: the data "DylanWilliams" with the pattern "[A-Z][a-z]+", described as "Extract names based on capital letters". DERIVATION: the pattern matches one upper-case letter followed by one or more lower-case letters; scanning from the left, the first such run in "DylanWilliams" is "Dylan" (it stops at the W, which is not in [a-z]). With return_mode omitted the documented behaviour is "0: Return the first string that matches the pattern", so the answer is the single string "Dylan". REGEX FLAVOUR, AS DOCUMENTED: "All regular expressions for this function, as well as REGEXTEST and REGEXREPLACE use the PCRE2 'flavor' of regex" -- Microsoft's own sentence, printed on all three REGEX pages. This corpus's patterns are deliberately confined to character classes, quantifiers and anchors, which mean the same thing in PCRE2, in RE2 and in the ICU flavour LibreOffice's own REGEX function documents, so a difference between engines here is a difference about the FUNCTION, not about dialect corners. Microsoft's page was re-read live on 2026-08-31 at https://support.microsoft.com/en-us/excel/functions/regexextract-function (the /en-us/office/<name>-function-<guid> path was returning Microsoft's 'Sorry, the page you're looking for can't be found' body throughout this batch, and the working path serves an 87 KB stub about half the time, so pages were fetched with retries until the payload exceeded 150 KB). EXECUTED RESULT -- GENUINELY ABSENT: LibreOffice returns #NAME? on all four pinned builds (24.2.0.3, 24.8.7.2, 25.2.0.3, 25.8.7.3), which agree case for case, under all four spellings probed before the run (plain, _xlfn., COM.MICROSOFT. and ORG.OPENOFFICE.). None of the three Excel REGEX functions exists in any LibreOffice release tested here. LibreOffice is not without regular expressions -- its own REGEX(Text; Expression [; [Replacement] [; Flags|Occurrence]]) is documented and works -- but it is a different function with a different name, a different argument shape and a different flavour (ICU, against the PCRE2 Microsoft's pages name), so a workbook using REGEXTEST or REGEXEXTRACT does not open and run; it has to be rewritten.

Matched
=COUNTA(REGEXEXTRACT(A2,"[A-Z][a-z]+",1)) The same pattern with return_mode 1, counted rather than indexed 1 2
Provenance

Microsoft's Example 1 runs the same data a second time with return_mode 1, documented as "1: Return all strings that match the pattern as an array". "DylanWilliams" contains exactly two capitalised words, so the array has two elements. The result is wrapped in COUNTA DELIBERATELY: Microsoft's page shows the array only as a screenshot and never states whether it spills down a column or across a row, so asserting INDEX(...,2) would be asserting an orientation this corpus cannot source. COUNTA is orientation-blind and still distinguishes return_mode 1 from return_mode 0, which returns a single string and would count 1. EXECUTED RESULT -- READ THIS ONE CAREFULLY: LibreOffice returns 1 on all four pinned builds (24.2.0.3, 24.8.7.2, 25.2.0.3, 25.8.7.3), which agree case for case, not #NAME?. That is NOT a partially-working REGEXEXTRACT. COUNTA counts non-empty cells, and an error value is not empty, so COUNTA(#NAME?) is 1: the wrapper this case uses to avoid asserting an array orientation also swallows the #NAME? underneath it. The other four cases in this file show the raw #NAME?, and the function is absent under all four spellings probed. The count of 1 here is an artefact of the wrapper, not evidence of anything the engine computed.

Mismatch
=REGEXEXTRACT("2024-08-31","-([0-9]{2})-",2) return_mode 2, which returns the capturing groups of the first match #N/A 08
Provenance

Microsoft documents return_mode "2: Return capturing groups from the first match as an array" and explains: "Capturing groups are parts of a regex pattern surrounded by parentheses '(...)'. They allow you to return separate parts of a single match individually." The pattern here has exactly ONE group, so the returned array has one element and coerces to the scalar string "08" -- chosen that way so the case tests the group extraction without depending on how a multi-element array is laid out. The match itself is "-08-" and the group inside it is "08". Note the documented remark that "REGEXEXTRACT always return text values" (Microsoft's own grammar): the expected value is the two-character STRING "08", not the number 8.

Mismatch
=REGEXEXTRACT("abcDEF","[A-Z]+",0,1) The documented case_sensitivity argument set to case-insensitive #N/A abc
Provenance

Microsoft documents case_sensitivity as "0: Case sensitive" (the default) and "1: Case insensitive". With matching made case-insensitive, [A-Z]+ also matches lower-case letters, so the FIRST match in "abcDEF" is the leading run "abc" -- not "DEF", which is what the same call returns with the default sensitivity. The two readings give different answers on the same string, which is what makes this a real test of the argument rather than a decoration.

Mismatch
=REGEXEXTRACT("abc","[0-9]+") A pattern that matches nothing #N/A #N/A
Provenance

There is no digit in "abc", so nothing matches. #N/A -- "not available" -- is Excel's error for a lookup that found nothing, and it is what this function family returns on no match; the value is asserted here so that an engine returning an empty string, a zero or #VALUE! instead is recorded as different.

Matched

LibreOffice Calc 25.8.7.3 (tested 2026-08-31)

FormulaDescriptionResultExpectedVerdict
=REGEXEXTRACT(A2,"[A-Z][a-z]+") Microsoft's documented example: the first match of a capitalised-word pattern #NAME? Dylan
Provenance

Microsoft's Example 1 is exactly this: the data "DylanWilliams" with the pattern "[A-Z][a-z]+", described as "Extract names based on capital letters". DERIVATION: the pattern matches one upper-case letter followed by one or more lower-case letters; scanning from the left, the first such run in "DylanWilliams" is "Dylan" (it stops at the W, which is not in [a-z]). With return_mode omitted the documented behaviour is "0: Return the first string that matches the pattern", so the answer is the single string "Dylan". REGEX FLAVOUR, AS DOCUMENTED: "All regular expressions for this function, as well as REGEXTEST and REGEXREPLACE use the PCRE2 'flavor' of regex" -- Microsoft's own sentence, printed on all three REGEX pages. This corpus's patterns are deliberately confined to character classes, quantifiers and anchors, which mean the same thing in PCRE2, in RE2 and in the ICU flavour LibreOffice's own REGEX function documents, so a difference between engines here is a difference about the FUNCTION, not about dialect corners. Microsoft's page was re-read live on 2026-08-31 at https://support.microsoft.com/en-us/excel/functions/regexextract-function (the /en-us/office/<name>-function-<guid> path was returning Microsoft's 'Sorry, the page you're looking for can't be found' body throughout this batch, and the working path serves an 87 KB stub about half the time, so pages were fetched with retries until the payload exceeded 150 KB). EXECUTED RESULT -- GENUINELY ABSENT: LibreOffice returns #NAME? on all four pinned builds (24.2.0.3, 24.8.7.2, 25.2.0.3, 25.8.7.3), which agree case for case, under all four spellings probed before the run (plain, _xlfn., COM.MICROSOFT. and ORG.OPENOFFICE.). None of the three Excel REGEX functions exists in any LibreOffice release tested here. LibreOffice is not without regular expressions -- its own REGEX(Text; Expression [; [Replacement] [; Flags|Occurrence]]) is documented and works -- but it is a different function with a different name, a different argument shape and a different flavour (ICU, against the PCRE2 Microsoft's pages name), so a workbook using REGEXTEST or REGEXEXTRACT does not open and run; it has to be rewritten.

Mismatch
=COUNTA(REGEXEXTRACT(A2,"[A-Z][a-z]+",1)) The same pattern with return_mode 1, counted rather than indexed 1 2
Provenance

Microsoft's Example 1 runs the same data a second time with return_mode 1, documented as "1: Return all strings that match the pattern as an array". "DylanWilliams" contains exactly two capitalised words, so the array has two elements. The result is wrapped in COUNTA DELIBERATELY: Microsoft's page shows the array only as a screenshot and never states whether it spills down a column or across a row, so asserting INDEX(...,2) would be asserting an orientation this corpus cannot source. COUNTA is orientation-blind and still distinguishes return_mode 1 from return_mode 0, which returns a single string and would count 1. EXECUTED RESULT -- READ THIS ONE CAREFULLY: LibreOffice returns 1 on all four pinned builds (24.2.0.3, 24.8.7.2, 25.2.0.3, 25.8.7.3), which agree case for case, not #NAME?. That is NOT a partially-working REGEXEXTRACT. COUNTA counts non-empty cells, and an error value is not empty, so COUNTA(#NAME?) is 1: the wrapper this case uses to avoid asserting an array orientation also swallows the #NAME? underneath it. The other four cases in this file show the raw #NAME?, and the function is absent under all four spellings probed. The count of 1 here is an artefact of the wrapper, not evidence of anything the engine computed.

Mismatch
=REGEXEXTRACT("2024-08-31","-([0-9]{2})-",2) return_mode 2, which returns the capturing groups of the first match #NAME? 08
Provenance

Microsoft documents return_mode "2: Return capturing groups from the first match as an array" and explains: "Capturing groups are parts of a regex pattern surrounded by parentheses '(...)'. They allow you to return separate parts of a single match individually." The pattern here has exactly ONE group, so the returned array has one element and coerces to the scalar string "08" -- chosen that way so the case tests the group extraction without depending on how a multi-element array is laid out. The match itself is "-08-" and the group inside it is "08". Note the documented remark that "REGEXEXTRACT always return text values" (Microsoft's own grammar): the expected value is the two-character STRING "08", not the number 8.

Mismatch
=REGEXEXTRACT("abcDEF","[A-Z]+",0,1) The documented case_sensitivity argument set to case-insensitive #NAME? abc
Provenance

Microsoft documents case_sensitivity as "0: Case sensitive" (the default) and "1: Case insensitive". With matching made case-insensitive, [A-Z]+ also matches lower-case letters, so the FIRST match in "abcDEF" is the leading run "abc" -- not "DEF", which is what the same call returns with the default sensitivity. The two readings give different answers on the same string, which is what makes this a real test of the argument rather than a decoration.

Mismatch
=REGEXEXTRACT("abc","[0-9]+") A pattern that matches nothing #NAME? #N/A
Provenance

There is no digit in "abc", so nothing matches. #N/A -- "not available" -- is Excel's error for a lookup that found nothing, and it is what this function family returns on no match; the value is asserted here so that an engine returning an empty string, a zero or #VALUE! instead is recorded as different.

Mismatch

Docs & syntax

Related how-to recipes

Where REGEXEXTRACT behaves differently