Friday, 8 December 2023

Function regexp_replace



 
The following example examines the string, looking for two or more spaces. Oracle replaces each occurrence of two or more spaces with a single space.

SELECT
  REGEXP_REPLACE('500   Oracle     Parkway,    Redwood  Shores, CA',
                 '( ){2,}', ' ') "REGEXP_REPLACE"
  FROM DUAL;

REGEXP_REPLACE
--------------------------------------
500 Oracle Parkway, Redwood Shores, CA

select regexp_replace('East Champaran', '[^A-Za-z]', '') from dual;

Results 
-----------------
EastChamparan

No comments:

Post a Comment