regex - How to REGEXP_REPLACE special character -
i having issue following regex
select regexp_replace(declinereasondesc, '(.+)(£)(\d+)', '\1\3 (gbp)') r declinereason t
it not match following rows
too expensive : less £100 expensive : more £200
expected outcome
too expensive : less 100 (gbp) expensive : more 200 (gbp)
edit:
screenshot non-believers
figured out myself problem £
sure suspected
solution contains 2 steps first symbol code, if copy paste £
select ascii() dual
not fly. have select symbol following correct code.
select ascii(substr(declinereasondesc, 30,1)) declinereason t declinereasonid = 7;
in case gave 49827
then
select regexp_replace(declinereasondesc, '(.+)('||chr(49827)||')(\d+)', '\1\3 (gbp)') declinereason t;
and works.
Comments
Post a Comment