dylanhz commented on code in PR #25137:
URL: https://github.com/apache/flink/pull/25137#discussion_r1701484163


##########
docs/data/sql_functions.yml:
##########
@@ -304,7 +304,13 @@ string:
       not exceed the number of the defined groups.
 
       E.g. REGEXP_EXTRACT('foothebar', 'foo(.*?)(bar)', 2)" returns "bar".
-
+  - sql: REGEXP_EXTRACT_ALL(str, regex[, extractIndex])
+    table: str.regexpExtractAll(regex[, extractIndex])
+    description: |
+      Extracts all the strings in str that match the regex expression and 
correspond to the regex group extractIndex.
+      regex may contain multiple groups. extractIndex indicates which regex 
group to extract and starts from 1. 0 means matching the entire regular 
expression, also the default value if not specified.

Review Comment:
   According to Spark:
   ```SQL
   > select regexp_extract_all('www.apache.org', '([a-z]\\.)', null);
   NULL
   > select regexp_extract_all('100-200, 300-400', '(\\d+)-(\\d+)');
   ["100","300"]
   ```
   default value is `1` and `null` -> `null`.
   This comment helps a lot! I'll make a new commit soon to align with Spark.



-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to