03 June 2019 · Ryan-Dallas ·       Add to Favorites   Report

BigQuery REGEX_MATCH Equivalent

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]")

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

For example

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

Ryan-Dallas

posted on 03 June 2019

Read great educational content like this and a lot more !

Members get free exclusive access to content, new courses, and discounts. Signup for a free account to write a post / comment / upvote posts. Creating an account takes less than 5 seconds and you can start earning badges & points too

Copied