在ORACLE中,通过正则 :
select regexp_replace(telNUM,'((.*?)(1[3|5|7|8|][0-9]{9}))','\3,') from TELNUMBER;
得到的结果是 :
aa130123456789bbb --》13012345678,9bbb
aa130123456789bbb15800000000131999999999 --》13012345678,15800000000,133999999999,
实际需要的结果:
aa130123456789bbb --》13012345678,
aa130123456789bbb15800000000131999999999 --》13012345678,15800000000,133999999999,
求正则表达式?
谢谢
------解决思路----------------------
1、查询
2、写java代码进行字符串处理
------解决思路----------------------
先拆分提取,然后再合并
with T AS(
select ROWID ID,REGEXP_SUBSTR(A, '1[3
------解决思路----------------------
5
------解决思路----------------------
7
------解决思路----------------------
8
------解决思路----------------------
][0-9]{9}', 1, LEVEL) A
from TABLE1
CONNECT BY LEVEL <= REGEXP_COUNT(A, '1[3
------解决思路----------------------
5
------解决思路----------------------
7
------解决思路----------------------
8
------解决思路----------------------
][0-9]{9}')
and rowid= prior rowid
and prior dbms_random.value is not null;
)
SELECT WMSYS.WM_CONCAT(A)
FROM T
GROUP BY ID