December 2017
Beginner to intermediate
264 pages
5h 38m
English
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:
#legacySQLSELECT REGEXP_MATCH('reachme@example.com',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:
#legacySQLSELECT REGEXP_EXTRACT('reachme@example.com',r'[\w-]+@([\w-]+\.)+[\w-]+')
The REGEXP_REPLACE function will replace the part of the string that matches the regular expression with the given value. ...
Read now
Unlock full access