trazio, trazio i nasao... . da bi radilo i za nase stranice, mora malo da se prepravi...
Sub MakeHyperlinks(sContents)
Dim re, oMatches, oMatch, sURL, sLabel
Set re = New RegExp
re.Pattern = "(http://|https://|ftp://|gopher://)?([\w+-_]+\.)+(biz|com|gov|edu|name|net|org|us|uk|ca|au|jp) (/[\w-_\.]+)+(\??\S+)"
re.Global = True
re.IgnoreCase = True
re.Multiline = True
sContents = re.Replace(sContents, "<a href=""$1$2$3$4$5"" target=""_blank"">$2$3</a>")
End Sub
a koristi se na razne nacine. jedan od njih je:
sContents = "Trebalo bi posetiti http://www.willness.co.sr iako sajt jos nije zavrsen "
MakeHyperlinks(sContents)
Response.Write(sContents)
- preuzeto sa www.dbforums.com
|