SELECT `justfunctions.eu.remove_email_plus_address`("[email protected]")
/*--Output--
[email protected]
*/
CREATE OR REPLACE FUNCTION `your_project_id.your_dataset_id.remove_email_plus_address`(`email` STRING)
RETURNS STRING AS (REGEXP_REPLACE(email,r'(\+\w+)(@)', r'\2'))
OPTIONS ( description = ''' any sub-address (also known as plus addressing) from an <email> address.''')
SQL User Defined Function (SQL UDF)
See something wrong? Contact us or report an issue on Github.