Applies to: Databricks SQL Databricks Runtime
Extracts the all strings in
str that matches the
regexp expression and corresponds to the
regex group index.
str: A STRING expression to be matched.
regexp: A STRING expression with a matching pattern.
idx: An optional integral number expression greater or equal 0 with default 1.
An ARRAY of STRING.
regexp string must be a Java regular expression.
String literals are unescaped. For example, to match
'\abc', a regular expression for
regexp can be
regexp may contain multiple groups.
idx indicates which regex group to extract.
idx of 0 means match the entire regular expression.