Currently, I am working on extracting substring from a single string using regular expressions in Snowflake. This is what I have as of now.
e.g. String = 'These are the Id's which I have WPD4567, WPD36785 also this is another id WPD111234 '
I want to extract all the substrings starting with WPD i.e. WPD4567 WPD36785 WPD111234.
I want to have these substrings in the same column or different columns.
This is what I have tried as of now:
select
REGEXP_SUBSTR('These are the Id's which I have WPD4567, WPD36785 also this is another id WPD111234 ','(WPD)(.*)\\d*')
Actual Output : WPD111234
Expected Output : WPD4567 WPD36785 WPD111234
