I use regexp_extract() to extract substring from string.
One type of substring looks like: Abc-Def-ghi
I use regexp_extract(s, '^[a-zA-Z0-9]{1,}\-[a-zA-Z0-9]{1,}\-[a-zA-Z0-9]{1,}')) to get it.
The other type of substring looks like: wp.Abc-Def-ghi
How can I get both types of strings using one regexp_extract()?
1 Answer