how to replace ASCII characters other than 1-127 range in Google bigquery?

Viewed 703

I have a requirement in which I wanted to replace characters other than ASCII character range 1-127.

Below is the oracle implementation:

REGEXP_REPLACE(Student_Address, '[^' || CHR(1) || '-' || CHR(127) || ']','') 

Could you please provide Bigquery equivalent solution.

1 Answers

Use below

REGEXP_REPLACE(Student_Address, r'[^[:ascii:]]', '')
Related