Busca URLs en un texto y las convierte en un enlace con la URL como texto enlazable y sin title.
function SnTurls(texto) SnTurls = texto Set regx = New RegExp regx.Pattern = "http:\/\/[a-z]+\.[a-z]+\.[a-z]+\/" set matchs = regx.Execute(texto) for each match in matchs SnTurls = Replace(SnTurls, match, "<a href=""" & match & """>" & match & "</a>") next end function
Para que validemos un url en un campo de texto
bool IsValidEmail(string strIn) { // Return true if strIn is in valid e-mail format. return Regex.IsMatch(strIn, @"^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0- 9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$"); }
http://username:password@hostname/path/directory/file.php?arg=