希望把以下列表中(****, *代表数字删除,正则表达式怎么写?

例如(15,5,0),变成5,0),(15,543,0),变成543,0),(15,542,0),(15,5,0),(15,6,0),(15,5,0),(15,5,0),... 例如 (15, 5, 0), 变成 5, 0),
(15, 543, 0), 变成 543, 0),
(15, 542, 0),
(15, 5, 0),
(15, 6, 0),
(15, 5, 0),
(15, 5, 0),
(15, 6, 0),
(1542, 5, 0),
(1444, 2, 0),
(1446, 543, 0),
(1448, 2, 0),
(1449, 5, 0),
(1451, 5, 0),
(1452, 5, 0),
(16, 542, 0),
(16, 6, 0),
(16, 5, 0),
(16, 5, 0),
(16, 6, 0),
(16, 5, 0),
(1460, 5, 0),
(1461, 6, 0),
(1463, 5, 0),
(1465, 542, 0),
(1466, 5, 0),
(1467, 6, 0),
(1469, 5, 0),
(1471, 543, 0),
(1473, 542, 0),
(1474, 6, 0),
(1476, 6, 0),
(15, 5, 0),
(15, 5, 0),
(1480, 1, 0),
(1481, 5, 0),
(1482, 5, 0),
(1483, 542, 0),
(1485, 6, 0),
(1488, 5, 0),
(1489, 6, 0),
(1491, 6, 0),
(1493, 543, 0),
(1494, 5, 0),
(1495, 6, 0),
(1497, 5, 0),
(15, 5, 0),
(15, 541, 0),
(15, 5, 0),
(15, 6, 0),
(1504, 1, 0),
(15, 5, 0),
(15, 6, 0),
(15, 543, 0),
(1509, 542, 0),
(15, 542, 0),
(15, 543, 0),
(15, 5, 0),
(15, 6, 0),
(1543, 5, 0),
(1543, 6, 0),
(1543, 5, 0),
(1543, 5, 0),
(1543, 6, 0),
(15, 5, 0),
(15, 5, 0),
(15, 5, 0),
(15, 1, 0),
(15, 5, 0),
(15, 5, 0),
(15, 5, 0),
(1530, 6, 0),
(15, 542, 0),
(1532, 6, 0),
(1533, 5, 0),
(15, 6, 0),
(1535, 6, 0),
(1536, 542, 0),
(16, 5, 0),
(1538, 6, 0),
(1539, 5, 0),
(1541, 5, 0),
(1542, 543, 0),
(1543, 5, 0),
(1544, 5, 0),
(1546, 5, 0),
(1549, 5, 0),
(1552, 5, 0),
(1553, 6, 0),
(1554, 5, 0);
展开
 我来答
百度网友9308069
2011-07-01 · TA获得超过1万个赞
知道大有可为答主
回答量:3947
采纳率:89%
帮助的人:1920万
展开全部
$s=原字符串;
$o=preg_replace('/\(\d+,\s*?(\d+)/', '$1', $s);
echo $o;
===========
542, 0),5, 0),6, 0),5, 0),5, 0),6, 0),5, 0), 2, 0),543, 0),2, 0),5, 0),5, 0), 5, 0),542, 0),6, 0),5, 0),5, 0), 6, 0),5, 0),5, 0),6, 0),5, 0), 542, 0),5, 0),6, 0),5, 0), 543, 0),542, 0),6, 0),6, 0),5, 0),5, 0), 1, 0),5, 0),5, 0),542, 0),6, 0), 5, 0),6, 0),6, 0),543, 0), 5, 0),6, 0),5, 0),5, 0), 541, 0),5, 0),6, 0),1, 0), 5, 0),6, 0),543, 0),542, 0), 542, 0),543, 0),5, 0),6, 0),5, 0), 6, 0),5, 0),5, 0),6, 0),5, 0), 5, 0),5, 0),1, 0),5, 0),5, 0), 5, 0),6, 0),542, 0),6, 0), 5, 0),6, 0),6, 0),542, 0), 5, 0),6, 0),5, 0),5, 0), 543, 0),5, 0),5, 0),5, 0), 5, 0),5, 0),6, 0),5, 0);
己闻楣Sx
2011-07-01 · TA获得超过1935个赞
知道大有可为答主
回答量:1057
采纳率:93%
帮助的人:909万
展开全部
查找:\(\d+,(.+?\)[,;])
替换:\1
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
blacklong
2011-07-01 · TA获得超过1500个赞
知道大有可为答主
回答量:2745
采纳率:0%
帮助的人:1246万
展开全部
什么语言?
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
计名pS
2011-07-01 · TA获得超过3649个赞
知道大有可为答主
回答量:4189
采纳率:0%
帮助的人:2195万
展开全部
s/^\(\s*\d+,\s*(?=\d)//g
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 更多回答(2)
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式