Regex for url formatting (www.domain.tld to anchors)
- by Kristaps
Hi. I'm currently developing a little browser-based Twitter widget.
Currently, I'm stuck with getting the URLs to work. I'm kinda newbie, when it comes to regex (I know, how to get parts of a string, but this one – tough one).
So, I need a regex that would search/replace
www.domain.tld -> <a href="http://www.domain.tld">http://www.domain.tld</a>
With/without http://, preferably.
Any advice is welcome. Thanks.