boluor commented on issue #3100:
URL: https://github.com/apache/doris-website/issues/3100#issuecomment-4525796160
\`regexp_extract_all\` is present in branch-2.1 — verified in
\`BuiltinScalarFunctions.java\` (\`scalar(RegexpExtractAll.class,
\"regexp_extract_all\")\`) and behaves as documented when called.
The thing to know: the function returns matches of the **first capture
group** in the pattern, not the whole match. So the pattern must contain
\`(...)\`:
\`\`\`sql
SELECT regexp_extract_all('abc123xyz456', '[0-9]+'); -- returns '' (no
capture group)
SELECT regexp_extract_all('abc123xyz456', '([0-9]+)'); -- returns
['123','456']
\`\`\`
The doc's own examples all use capture groups for this reason; the
description line says \"extract all the parts that match the first sub -
pattern of the specified \`pattern\`\".
If you were getting empty results on 2.1.8-rc01, please share the exact call
so we can confirm it's the same case. Otherwise this can be closed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]