Reputation: 255
I have a list of URLs that I'd like to convert into HTML.
Here's an example:
http://blah.com
https://abc.com
http://123.com
to
<a href="http://blah.com">http://blah.com</a>
<a href="https://abc.com">https://abc.com</a>
<a href="http://123.com">http://123.com</a>
I know that I can use an online converter, but I also want to learn how to make the most out of Notepad++ and Sublime Text. I'm not even sure if I can do that or if there's an easier way (without using a converter).
Also, any easy to learn regex resources? I've checked out RegexPal and RegExr but didn't find them helpful.
Thank you.
Upvotes: 0
Views: 1182
Reputation: 5343
search -> replace
replace: (https?://\S*)
with: <a href="\1">\1</a>
search method: regexp
Upvotes: 1