Hi All,
In my program I am loading the content of a text file (main.txt) into a
string called 'message'.
What I need is to convert all urls and emails in this string into html.
This is what I did to convert hard returns to <br>'s and it works fine:
Dim sws As New IO.StreamWriter(pathtosave)
sws.WriteLine(message.Replace(Chr(13), "<br>"))
So hard returns were easy, but how to do it in case of urls and emails?
So, that in case of url it should change "www.test.com" to "<a
href="http://www.test.com">www.test.com</a>" and in case of email it
should change something like "te**@test.com" to "<a
href="mailto:te**@test.com">te**@test.com</a>"
Can someone help me out?
Martin