I am attempting to uppercase the replacement string from my reg expression without success:
SELECT regexp_replace('src=/i/uie_v2/js','(/uie_v2/)',upper('\1')) from dual
returns 'src=/i/uie_v2/js'
I understand that upper cannot be used .. just showing as an example. Any ideas on how to achieve this ?
AFAIK, you cannot do this directly, but you can take the string apart and rebuild it:
SELECT regexp_replace('src=/i/uie_v2/js','(.*)(/uie_v2/)(.*)', '\1') ||
upper(regexp_substr('src=/i/uie_v2/js','(/uie_v2/)')) ||
regexp_replace('src=/i/uie_v2/js','(.*)(/uie_v2/)(.*)', '\3')
from dual
I got the idea from an OTN forums thread on REGEXP.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With