正则表达式在Notepad ++中将URL转换为HTML <a href>超链接?

mem*_*rat 3 regex notepad++

我有一个文本文件中的URL列表我试图更改为HTML,但我失败了.

我的网址采用以下格式:

http://mydomain.com/here-are-my-links.html
Run Code Online (Sandbox Code Playgroud)

有没有人知道我可以在Notepad ++中运行的正则表达式搜索/替换命令将我的URL列表更改为以下格式:

<a href="http://mydomain.com/here-are-my-links.html">here are my links</a>
Run Code Online (Sandbox Code Playgroud)

Ani*_*dha 5

使用正则表达式

(http://mydomain.com/(.*?)\.html)

并替换它

<a href="\1">\2</a>


如果你想-换成space你可以做到这一点

-(?=[^<>]*?</a>)

并替换它