日期:2014-05-17 浏览次数:20970 次
--按你的写法 declare v_sql long; i number :=1; j number :=1; begin v_sql:='a=badfd+dfddc+ddasd+sfd'; v_sql:=regexp_replace(v_sql,'[a-zA-Z]+=',''); loop select instr(v_sql,'+',1,j) into i from dual; dbms_output.put_line(regexp_substr(v_sql,'[^+]+',1,j)); j:=j+1; exit when i=0; end loop; end; / /* badfd dfddc ddasd sfd */