I am having issue with following regex
select REGEXP_REPLACE(declinereasondesc, '(.+)(£)(\d+)', '\1\3 (GBP)') as r from DECLINEREASON t
it does not match following rows
Too expensive : By less than £100
Too expensive : By more than £200
Expected outcome
Too expensive : By less than 100 (GBP)
Too expensive : By more than 200 (GBP)
EDIT:
screenshot for non-believers
Figured it out myself problem is
£
as I am sure everyone suspectedSolution contains two steps first is to get symbol code, even if you copy paste
£
intoselect ascii() from dual
it does not fly. You have to select the symbol like following to get correct code.In my case it gave
49827
then
and only then it works.