REGEXP_REPLACE to convert -1,234.56 to -1234.56
Hi All,
Need help to convert varchar2 value to NUMBER by removing alpha bates & any other special charactetrs except -(minus) & .(decimal)
e.g. -0.1,23,456 to -0.123456
-18,345.234. to -18345.234
2.61E-12 to 0.00000000000261
Tried below
SELECT REGEXP_REPLACE(' -0.1,23,456', '[^0-9 and . ]+', '') FROM DUAL
Result:
0.123456
Thanks & Regards,
Prashant