首页 > 代码库 > oracle 使用REGEXP_SUBSTR正则表达式拆分字符串

oracle 使用REGEXP_SUBSTR正则表达式拆分字符串

SELECT REGEXP_SUBSTR (‘first field, second field , third field‘, ‘[^,]+‘, 1,rownum)    FROM DUAL    CONNECT BY ROWNUM <=   LENGTH (‘first field, second field , third field‘) - LENGTH (REPLACE (‘first field, second field , third field‘, ‘,‘, ‘‘))+1;

------------------------------------------------------------------------------first fieldsecond fieldthird field

oracle 使用REGEXP_SUBSTR正则表达式拆分字符串