editplus 替换正则表达式,如何保留中间数字
把下面内容中每一行的cash背后的"数字"替换出来例如:{"code":"FordFocusST_eng0","type":"4","cash":"1497","gold...
把下面内容中每一行的cash背后的"数字"替换出来
例如:
{"code":"FordFocusST_eng0","type":"4","cash":"1497","gold":"0","version":"1"},
{"code":"FordFocusST_eng1","type":"4","cash":"2535","gold":"2","version":"1"},
{"code":"FordFocusST_eng2","type":"4","cash":"3650","gold":"3","version":"1"},
{"code":"FordFocusST_eng3","type":"4","cash":"7422","gold":"4","version":"1"},
{"code":"FordFocusST_eng4","type":"4","cash":"10230","gold":"5","version":"1"},
{"code":"FordFocusST_tur0","type":"4","cash":"1770","gold":"0","version":"1"},
{"code":"FordFocusST_tur1","type":"4","cash":"3094","gold":"0","version":"1"},
替换结果:
1497
2535
3650
……
类似这样。
大侠求助啊,查找条件、替换内容 这2行正则表达式不会搞啊 T_T 展开
例如:
{"code":"FordFocusST_eng0","type":"4","cash":"1497","gold":"0","version":"1"},
{"code":"FordFocusST_eng1","type":"4","cash":"2535","gold":"2","version":"1"},
{"code":"FordFocusST_eng2","type":"4","cash":"3650","gold":"3","version":"1"},
{"code":"FordFocusST_eng3","type":"4","cash":"7422","gold":"4","version":"1"},
{"code":"FordFocusST_eng4","type":"4","cash":"10230","gold":"5","version":"1"},
{"code":"FordFocusST_tur0","type":"4","cash":"1770","gold":"0","version":"1"},
{"code":"FordFocusST_tur1","type":"4","cash":"3094","gold":"0","version":"1"},
替换结果:
1497
2535
3650
……
类似这样。
大侠求助啊,查找条件、替换内容 这2行正则表达式不会搞啊 T_T 展开
2012-08-14
展开全部
查找:\{[^\}]*"cash":"(\d+)"[^\}]*\}
替换:$1
结果:
1497,
2535,
3650,
7422,
10230,
1770,
3094,
如果要去掉逗号:\{[^\}]*"cash":"(\d+)"[^\}]*\},
替换:$1
结果:
1497,
2535,
3650,
7422,
10230,
1770,
3094,
如果要去掉逗号:\{[^\}]*"cash":"(\d+)"[^\}]*\},
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Hi,
经测试,sd825041 解答正确,感谢,editplus本身不支持\d语法
查找 \{.*"cash":"([0-9]+)".*\},
替换 \1
经测试,sd825041 解答正确,感谢,editplus本身不支持\d语法
查找 \{.*"cash":"([0-9]+)".*\},
替换 \1
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
查找 \{.*"cash":"([0-9]+)".*\},
替换 \1
替换 \1
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询