替换字符:
select replace('xxyyzz','zz','') from dual 》》 xxyy
 
同时替换多个字符:
select replace(replace('xxyyzz','zz',''),'xx','') from dual >> yy
 
替换后缀:
select  regexp_replace('xxyyzziioo','oo|zz$','') from dual  >> xxyyzzii
 
替换前缀:
select  regexp_replace('xxyyzziioo','^(测试)|-测试','') from dual >> yyzziioo
 
替换全部:
select regexp_replace('xxyyzziioo','^xx|zz|oo$','') from dual >> yyii
 
select  regexp_replace('xxyyzziioo','^xx|zz|yy|oo$','') from dual; >>  ii
posted on 2017-12-11 18:11  Flink菜鸟  阅读(12378)  评论(0编辑  收藏  举报