I am trying to extract a sample_type field from an URL that works in regular regex, but is not working in BigQuery
This regex works fine in the online tool at regex101.com: (?<=sample_type=)[\w_]+
to extract the word apple, but does not seem to apply to BQ. What is the correct way to get what is after sample_type for BQ?
SELECT REGEXP_EXTRACT('asdfasdfjsklfjasdf/info?sample_type=apple', r'sample_type=\w_+')