Reputation: 59235
I want to do a case insensitive REGEX_MATCH and I'm not sure if I can use flags.
Upvotes: 8
Views: 3456
Reputation: 59235
BigQuery uses re2 for regular expressions, and re2 does support flags.
For example, to do a case insensitive match:
SELECT REGEXP_MATCH('TomatoPotato', r'TOpo')
false
SELECT REGEXP_MATCH('TomatoPotato', r'(?:TOpo)')
false
SELECT REGEXP_MATCH('TomatoPotato', r'(?i:TOpo)')
true
Upvotes: 13