BigQuery 是否支持正则表达式标志? [英] Does BigQuery support regular expressions flags?
本文介绍了BigQuery 是否支持正则表达式标志?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想做一个不区分大小写的 REGEX_MATCH,但我不确定是否可以使用标志.
I want to do a case insensitive REGEX_MATCH and I'm not sure if I can use flags.
推荐答案
BigQuery 使用 re2 作为正则表达式,而 re2 确实支持标志.
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
这篇关于BigQuery 是否支持正则表达式标志?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文