I'm trying to return a SUBSTR between two delimiters. The Problem is, that the second delimiter is non-unique in the whole string.
Example:
testurl.de/some:text/&[uniquedelimiter]=texttoextract:sometext:someothertext
So I want to extract the string between "&[uniquedelimiter]=" and the next ":" after the unique delimiter. The occurrence of ":" in the string is variable.
Right now I'm using a double SUBSTRING_INDEX function, but I get errors if the string contains more than one ":".
SELECT SUBSTRING_INDEX(SUBSTRING_INDEX(list_of_urls, '&[uniquedelimiter]=',-1),':')
FROM url_table;
I couldn't find a comparable solution on any Community.
Thank you so much for your help, Lars