Although the BigQuery Standard SQL documentation mentions the function REGEXP_MATCH
[1], it seems to be unavailable when running a query, with the web interface returning:
Error: Function not found: REGEXP_MATCH
What would be an alternative to using it?
[1] https://cloud.google.com/bigquery/sql-reference/functions-and-operators#regexp_match
BigQuery supports the Google Standard SQL dialect, but a legacy SQL dialect is also available. If you are new to BigQuery, you should use Google Standard SQL as it supports the broadest range of functionality. For example, features such as DDL and DML statements are only supported using Google Standard SQL.
If you want to remove a specific character from your String then you can use the Trimming function to do so. Based on the position of the character that you wish to remove there are three kinds of BigQuery String Functions: TRIM (value1[, value2]): It removes all the leading and trailing characters that match value2.
Comparing strings To do that we can use one of the STRING comparison functions: STARTS_WITH(value1, value2)-> Returns True/False if value1 starts with the substring value2.
what would be an alternative to using it?
You should use REGEXP_CONTAINS
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With