繁体   English   中英

以 7 位数字结尾的字段的 Big Query SQL 正则表达式

[英]Big Query SQL regex for a field ending with a 7 digit number

在我的查询中,我试图过滤 pagePath 以仅包含以七位数结尾的 pagePath 值。 我怎么能做到这一点?

SELECT pagePath
FROM table
where pagePath (ends with a 7 digit number)

只是:

where regexp_contains(pagePath, '\d{7}$')

正则表达式解释:

\d     a digit (0 to 9)
{7}    quantifier (hence we want 7 occurences of a digit)
$      end of the string

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM