[ https://issues.apache.org/jira/browse/FLINK-35962?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
lincoln lee closed FLINK-35962. ------------------------------- Fix Version/s: 2.0.0 Assignee: Dylan He Resolution: Fixed Fixed in master: cbbb1cd178a5b53200ee793f77bac73a0d49ff14 > Add REGEXP_INSTR function > ------------------------- > > Key: FLINK-35962 > URL: https://issues.apache.org/jira/browse/FLINK-35962 > Project: Flink > Issue Type: Sub-task > Components: Table SQL / API > Reporter: Dylan He > Assignee: Dylan He > Priority: Major > Labels: pull-request-available > Fix For: 2.0.0 > > > Add REGEXP_INSTR function. > ---- > Returns the position of the first substring in {{str}} that matches {{regex}}. > Example: > {code:sql} > > SELECT REGEXP_INSTR('Steven Jones and Stephen Smith are the best players', > > 'Ste(v|ph)en'); > 1 > > SELECT REGEXP_INSTR('Mary had a little lamb', 'Ste(v|ph)en'); > 0 > {code} > Syntax: > {code:sql} > REGEXP_INSTR(str, regex) > {code} > Arguments: > * {{str}}: A STRING expression to be matched. > * {{regex}}: A STRING expression with a pattern. > Returns: > An INTEGER. > Result indexes begin at 1, 0 if there is no match. > In case of a malformed {{regex}} the function returns an error. > If either argument is NULL, the result is NULL. > See also: > * > [Spark|https://spark.apache.org/docs/3.5.1/sql-ref-functions-builtin.html#string-functions] > * > [Databricks|https://docs.databricks.com/en/sql/language-manual/functions/regexp_instr.html] > * > [MySQL|https://dev.mysql.com/doc/refman/8.4/en/regexp.html#function_regexp-instr] > * > [PostgreSQL|https://www.postgresql.org/docs/16/functions-matching.html#FUNCTIONS-POSIX-REGEXP] -- This message was sent by Atlassian Jira (v8.20.10#820010)