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) |
Advertisement
Answer
use below
select *, regexp_extract(name, r'w+s+(.+)') from your_table
