REGEXP_EXTRACT_ALL
Matches the regular expression on the input string. Returns the escape groups if any exists or the original string if none exists.
Syntax
Arguments
Name | Type |
---|---|
first | string |
second | string |
Returns
Returns the substrings(s) matched by the regular expression.
Examples
first | second | Output |
---|---|---|
'abcdefabc' | 'abc' | [ |
'1a2b3' | '\d+' | [ |
'Word' | '^((((((((((..)?.)?.)?.)?.)?.)?.)?.)?.)?.)?' | [ |
'abab' | 'abc' | null |
null::string | 'abc' | null |
'abc' | '' | [ |
array['ab1', 'a2a', '345'] | '\d' | [ |
array['ab1', 'a2a', '345'] | array['\d', 'a'] | [ |
'abc' | null::string | null |
Transformation job example
SQL
Query result
first | second | Output |
---|---|---|
'abcdefabc' | 'abc' | [ |
Last updated