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
enter image description here

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. enter image description here


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -