Aru
Aru

Reputation: 31

How to remove \n���� from a sentence in bigquery

I want to remove \n���� from a sentence in biquery. I have used the following query REGEXP_REPLACE(Sentence, r'([^\p{ASCII}]+)', '') AS Senetnce. It is removing only the question marks. How do I remove \n also? Thanks.

Upvotes: 0

Views: 1693

Answers (1)

Mikhail Berlyant
Mikhail Berlyant

Reputation: 173028

try below

select regexp_replace(Sentence, r'\n|[^\p{ASCII}]+', '')     

if apply to your Question's title How to remove \n���� from a sentence in bigquery - output is

enter image description here

Upvotes: 2

Related Questions