Reputation: 577
So I have a column with names. Examples are the following
Mark (BB)
Andy White (CC)
The outcome I want is:
Mark
Andy White
StandardSQL in BQ does not accept RIGHT so I am struggling in starting a regexp from the end of the string.
I am not sure if trying to catch all what's inside the bracket (and bracket itself) or to try to catch the first space " ".
Can anybody help me?
Upvotes: 1
Views: 40
Reputation: 577
Got an answer:
REGEXP_EXTRACT(column_name, r"([^\(]+)")
Just needed to try more with the regular expression.
Upvotes: 1