I have a string which looks like
I'm trying to extract just 'this_is-the_text-that_I_want',
I thought it might look like regexp_substr(field_text ,'(?<=/?page_id\=)(.*?)(?=\&)' ,1 ,1, 'i')
But I get a message saying this is not a pattern.
Can someone help clarify who I pass a pattern into regexp_substr?
You just need to change a slash to a backslash:
regexp_substr(field_text ,'(?<=\?page_id\=)(.*?)(?=\&)' ,1 ,1, 'i')
Thanks Dieter, I hope you don't mind, I have a little additional question
What if I wanted to find more than on variant, could this work
In this example I'm also capturing any text between shop_id and the '&' symbol.
apologies, the adjusted function looks like
regexp_substr(fullurl ,'(?<=(\?page_id\=|/page_id/))(.*?)(?=\&)' ,1 ,1, 'i')