user2227402
user2227402

Reputation: 207

Lookahead in BigQuery Regexp

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?

Upvotes: 9

Views: 6879

Answers (1)

femtoRgon
femtoRgon

Reputation: 33351

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.

Upvotes: 7

Related Questions