正则表达式 - 删除第一个逗号之前的所有内容以及第二个逗号之后的所有内容 [英] Regex - Remove everything before first comma and everything after second comma in line
本文介绍了正则表达式 - 删除第一个逗号之前的所有内容以及第二个逗号之后的所有内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有以下字符串:
55,1001wuensche.com,0,354137264,1,"0.00 %",0,"0.00 %","2016-04-24 09:00:24"
56,100hoch3.de,47,2757361,2,"0.00 %",0,"0.00 %","2016-02-11 00:42:10"
我想删除第一个逗号之前的所有内容:55,
和 56,
I want to remove everything before the first comma: 55,
and 56,
AND 第二个逗号之后的所有内容.
AND everything after the second comma.
结果应该是这样的,只剩下域名了:
The result should look like this, where only the domain name is left:
1001wuensche.com
100hoch3.de
我正在使用 Notepad++ 来完成此操作.有人有想法吗?提前感谢您的帮助!
I'm using Notepad++ to accomplish this. Anybody got an idea? Thanks for your help in advance!
推荐答案
^.*?,(.*?),.*$
捕获组 $1
将是前两个逗号之间的所有内容.
The capture group $1
will be everything between the first two commas.
这篇关于正则表达式 - 删除第一个逗号之前的所有内容以及第二个逗号之后的所有内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文