The REGEXP_MATCH function will return true if the given value matches the regular expression. The following query will return true since the value passed is a valid email ID:
#legacySQL
SELECT REGEXP_MATCH('[email protected]',r'[\w-]+@([\w-]+\.)+[\w-]+')
The REGEXP_EXTRACT function will return the part of the string that matches the capturing group in the regular expression. The following example returns example. as the result since the domain name with . is inside the capturing group of this regular expression:
#legacySQL
SELECT REGEXP_EXTRACT('[email protected]',r'[\w-]+@([\w-]+\.)+[\w-]+')
The REGEXP_REPLACE function will replace the part of the string that matches the regular expression with the given value. The following query will replace the valid email ID with a place holder text:
SELECT REGEXP_REPLACE...