Hi All,
I was trying to use REGEXP_REPLACE to solve
2474213
And feels strange, when seeing the difference between the below two outputs STRING1 and STRING2 ( My DB - Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production).
The only difference in the two patterns is the additional "$" at the end in the first pattern
with t as
(select 'WEEKLY(.417,''THURSDAY'')x' repeat_interval from dual)
SELECT
repeat_interval,
regexp_replace(repeat_interval,'.*?''([^'']+)''.*$','\1') STRING1,
regexp_replace(repeat_interval,'.*?''([^'']+)''.*','\1') STRING2
FROM t;
REPEAT_INTERVAL STRING1 STRING2
------------------------ --------------- ---------------
WEEKLY(.417,'THURSDAY')x THURSDAY THURSDAY)x
Is it strange ( Or I need a coffee?)
Thanks,
jeneesh