GoogleCloudPlatform / bigquery-utils

Useful scripts, udfs, views, and other utilities for migration and data warehouse operations in BigQuery.
https://cloud.google.com/bigquery/
Apache License 2.0
1.11k stars 277 forks source link

Fixes issue in `regex_substr_4` function when regex has groupings. #372

Closed mswapnilG closed 1 year ago

mswapnilG commented 1 year ago

Like regex_substr_5, after successful regex match regex_substr_4 should return entire matched substring and not just the first group that is matched. With this fix, UDF exhibits the behavior that is consistent with other regex UDFs such as cw_regex_extract, cw_regex_substr_5 etc.