Regex 记事本++;替换为reg表达式?

Regex 记事本++;替换为reg表达式?,regex,notepad++,Regex,Notepad++,我有一个包含链接和其他日期的大列表。我想过滤掉所有的数据,并有一个只有链接的列表 当前列表的示例: 32,2012-01-04 06:44:44,http://link.com/link 33,2012-01-04 06:44:45,http://link.com/link,{Text|textext|text},http://link.com/link|http://link.com/link|http://link.com/link 32,2012-01-04 06:44:44,http:

我有一个包含链接和其他日期的大列表。我想过滤掉所有的数据,并有一个只有链接的列表

当前列表的示例:

32,2012-01-04 06:44:44,http://link.com/link 33,2012-01-04 06:44:45,http://link.com/link,{Text|textext|text},http://link.com/link|http://link.com/link|http://link.com/link 32,2012-01-04 06:44:44,http://link.com/link 33,2012-01-04 06:44:45,http://link.com/link,{Text | Text | Text},http://link.com/link|http://link.com/link|http://link.com/link
Notepad++使用正则表达式提供查找替换功能。您可以使用Ctrl+H访问此功能

如果您实际上要求使用正则表达式来完成此操作,则可以使用类似以下内容来匹配URL:

\b(([\w-]+:/?(www[.])[^\s()]+(?:\([\w\d]+\)|([^[:punct:][\s]./))
我找到了


此外,您可以使用您提供的输入在

上轻松地测试对正则表达式的更改,这里有一个您可以在上使用的模式 您需要确保全局(/g)标志处于启用状态

表达方式:

.*?(http.*?)[,|\n]
输入:

32,2012-01-04 06:44:44,http://link.com/link1 
33,2012-01-04 06:44:45,http://link.com/link2,{Text|textext|text},http://link.com/link3|http://link.com/link4|http://link.com/link5
替代:

$1\n
输出:

http://link.com/link1 
http://link.com/link2
http://link.com/link3
http://link.com/link4
http://link.com/link5

您希望结果是什么样子?Notepad++的正则表达式引擎非常有限,以至于给定的表达式无法工作。如果文件不是太大,我就用这个网站来做你想要的修改。这个文件只有150行,但是有时候一行上有3个链接。但我不知道如何使用gskinner或regex以及所有这些函数。有人能帮我吗?
[,| \n]
是一个字符类,与
\n
匹配。我猜你的意思是
(,|\n)
[,\n]
。但是
(,|\R)
更好,
\R
匹配
\n
\R
\R\n
@M42我指的是文字
。一些链接使用
|
分隔。很好的呼叫
\R
-感谢您的解释!