hankknight
asked on
ASP.NET / VB / REGEX: Automatically create links beginning with www at beginning
I use the following code to make links clickable where the link begins with www.
The problem is that this becomes clickable links:
zwww.example.com
/www.example.com
>www.example.com
It should ONLY become a clickable link if it starts with www and does not have another charactor (other than whitespace)
input = RegularExpressions.Regex.Replace(input, "(\www\.\S+[^\s@,.""']+)", "<a href=""http://$1"">$1</a>")
The problem is that this becomes clickable links:
zwww.example.com
/www.example.com
>www.example.com
It should ONLY become a clickable link if it starts with www and does not have another charactor (other than whitespace)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.