Those who report problems, please simply take a look at the problem carefully and see if you can solve it before reporting it. This is not about converting txt to html. Reporting the problem without reading it is really high quality!
The document format is as follows:
https://www.baidu.com
You will know it by Baidu
https://www.zhihu.com
Zhihu
https://www.github.com
Github
http://m.sina.com/beta
Sina Weibo
…………
I want to convert this format into link text wrapped in html a tags, for example:
You will know it in Baidu
Zhihu
Gihub
Sina Weibo
How to achieve it ?
An idea, not verified yet
Regular matching newline, $1 is the link, $2 is the text. Then replace it with regular expression to generate the link text you want