jonneMedlem sedan jan. 20011 154 inlägg Litet problem.
Vill kunna skriva följande.
[mail]anv@host.com[/mail] och få följande i htmlkoden:
A HREF="mailto:anv@host.com">anv@host.com</a>
Har lyckats med div replace funktioner att få in adressen i ahref men hur ska jag få det så att adressen även syns på sidan och inte bara i html koden ?
------------------
//Jonne, a beliver of murphys law
Använd istället:
strText = "Din text bla bla info@fencing4u.nu samt <A HREF="http://www.fencing4u.nu"" TARGET=_blank>www.fencing4u.nu"</A>
mDelimit = Chr(0)
Set re = New RegExp
re.Global = True
re.IgnoreCase = true
re.Pattern = "(\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+)"
strText = re.Replace(strText, "<a href=""mailto" & mDelimit & ":$1"">$1</a>")
re.Pattern = "(http://|https://|ftp://|mailto:)(\S)(\S+)"
strText = re.Replace(strText, "<a href=""$1$2" & mDelimit & "$3"" TARGET='_blank'>$2" & mDelimit & "$3</a>")
re.Pattern = "(www\.(\S)(\S+))"
strText = re.Replace(strText, "<a href=""http://$1"" TARGET='_blank'>$1</a>")
strText = Replace(strText, mDelimit, "")
------------------
fencing for you?
http://www.fencing4u.nu/