3
votes

I'm trying to create a query that will select everything that is not matching a given regex

In legacy, we had REGEX_MATCH so I was able to do WHERE x NOT REGEX_MATCH("[a-z]")

What would be the equivalent on standard SQL?

1

1 Answers

15
votes

In BigQuery Standrad SQL you should use REGEXP_CONTAINS(value, regex) instead

For example

WHERE NOT REGEXP_CONTAINS(x, r'[a-z]')