Reputation: 1232
How can I extract all the characters after the first word?
For example, I would like to have (084M)
in its own column with the parentheses included. I've tried to SPLIT
and REGEXP_EXTRACT
but I have ran into issues.
Table:
Name |
---|
Elizabeth (084M) |
Elizabeth (084M) |
Elizabeth (084M) |
Pittston (14KN) |
Pittston (14KN) |
Pittston (14KN) |
Cheektowaga (14ON) |
Upvotes: 0
Views: 964
Reputation: 173210
use below
select *,
regexp_extract(name, r'\w+\s+(.+)')
from your_table
Upvotes: 1