Oracle regexp_replace remove non alpha ASCII

Replace everything that isn’t a standard ASCII alpha character with a space:

SELECT REGEXP_REPLACE ( 'xxXX € Ááé 123 %; test text æ¸¬è© ¦ “xmxmx” number²'
, '[^a-zA-Z]'
, ' '
) FROM DUAL

h/t Kok Yan Lo and jadarnel27

Update : an alternative method from Paul Bradley:

select 'ÄÊÍÕØÓÑ' str, substr(upper(utl_raw.cast_to_varchar2((nlssort('ÄÊÍÕØÓÑ', 'nls_sort=binary_ai')))),1,10) str2 from dual ;
October 2, 2012

Leave a Reply

Your email address will not be published. Required fields are marked *