本帖最后由 kmonkey 于 2014-08-25 16:15:37 编辑

解决方案 »

  1.   

    利用!拆分,分别处理,然后再进行合并select replace(
      wmsys.wm_concat(substr(str,1,instr(str,'01')-1)||'01.02'||substr(str,instr(str,'01')+2))
      ,',','!') str
    from
      (select REGEXP_SUBSTR('01!01.01!01.01.01', '[^!]+', 1, LEVEL) STR
      from dual
      CONNECT BY LEVEL <= REGEXP_COUNT('01!01.01!01.01.01', '!') + 1)
      

  2.   

    测试结果
    STR
    01.02!01.02.01!01.02.01.01
      

  3.   

    如果!后紧跟着就是01就好办了,那样的话不需要正则
    substr(replace('!'||字段名,'!01','!01.02'),2)
      

  4.   


    SELECT REGEXP_REPLACE('01!01.01!01.01.01','(^01|!01)','\1.02') FROM DUAL;