BigQuery将re2用于正则表达式,而re2确实支持标志.
例如,要进行不区分大小写的匹配:
SELECT REGEXP_MATCH('TomatoPotato', r'TOpo')
false
SELECT REGEXP_MATCH('TomatoPotato', r'(?:TOpo)')
false
SELECT REGEXP_MATCH('TomatoPotato', r'(?i:TOpo)')
true
Run Code Online (Sandbox Code Playgroud)