haruki-830 commented on code in PR #4491:
URL: https://github.com/apache/flink-cdc/pull/4491#discussion_r3718281339


##########
flink-cdc-runtime/src/main/java/org/apache/flink/cdc/runtime/functions/impl/StringFunctions.java:
##########
@@ -62,6 +65,72 @@ public static String regexpReplace(String str, String regex, 
String replacement)
         }
     }
 
+    /** Returns a string extracted with a specified regular expression and 
capture group index. */
+    public static String regexpExtract(String str, String regex) {
+        return regexpExtract(str, regex, 0);
+    }
+
+    public static String regexpExtract(String str, String regex, Number 
extractIndex) {
+        if (extractIndex == null || extractIndex.longValue() < 0) {
+            return null;
+        }
+        Matcher matcher = getRegexpMatcher(str, regex);

Review Comment:
   Addressed in the latest commit.



-- 
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]

Reply via email to