regex - mySQL replace string + additional string with a static value -


unlike php, don't believe mysql has preg_replace() feature, matching via regexp. here strings have in code:

http://ourcompany.com/theapplestore/... http://ourcompany.com/anotherstore/... http://ourcompany.com/yetanotherstore/... 

as can see, there constant in there, http://ourcompany.com/, there variable string namely theapplestore, anotherstore, etc. etc.

i want replace constant string, plus variable string(s), , trailing slash (/) after variable string(s), single shortcode value, namely {{store url=''}}

edit if helps, store codes same length, going sch131785 sch185399 sch634019 etc. i.e., 9 characters long

how this? thanks.

i thought might useful: there no way in mysql. find using regexp, yes; replace, no. said, there post extension library mentioned, sagi:

is there mysql equivalent of php's preg_replace?


Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -