WITH t AS ( SELECT '01198111234' tel FROM dual UNION ALL SELECT '0111111111' FROM dual UNION ALL SELECT '021111111' FROM dual UNION ALL SELECT '0511111111' FROM dual UNION ALL SELECT '0211111111' FROM dual ) SELECT tel , REGEXP_REPLACE(tel , '(02|031|032|033|041|042|043|051|052|053|054|055|061|062|063|064' ||'|010|011|016|017|018|019' ||'|030|050|060|070|080)' ||'(.+)(.{4})' , '\1-\2-\3' ) tel_new FROM t ;