BigQuery正则表达式中的前瞻性 [英] Lookahead in BigQuery Regexp

查看:38
本文介绍了BigQuery正则表达式中的前瞻性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

似乎BigQuery正则表达式不支持超前功能.有人知道这是正确的吗,如果是,是否有计划在不久的将来提供支持?

It seems like BigQuery regexp does not support lookahead functionality. Does anybody know if this is correct, and if it is, is there any plan to support it sometime soon?

推荐答案

BigQuery正则表达式使用 re2 .似乎没有计划向re2添加环顾断言(或偶然的反向引用).据我所知,添加它们的硬性限制是找到适当的实现来维持线性运行时间,这是由re2保证的.

BigQuery regex uses re2. It appears that there are no plans to add lookaround assertions (or backreferences, incidentally) to re2. As far as I can tell, the hard limit on adding them is finding an adequate implementation that maintains linear running time, as guaranteed by re2.

但是,在我看来,在正则表达式中添加反向引用或环顾断言的时机是重新审视正则表达式是否真正适合该工作的好时机.

In my opinion, though, the point at which you add backreferences or lookaround assertions to a regex is a really good time to revisit whether regex is really the right tool for the job.

这篇关于BigQuery正则表达式中的前瞻性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆