function AutoLink (content)
dim re
Set re = New RegExp
' First Pass for http
re.Pattern = "(\w+):\/\/([^/:]+)(:\d*\b)?([^# \n<]*).*\n"
re.Pattern = "([0-9a-zA-Z./@:~?&=_-]+)"
re.Pattern = "https://([0-9a-zA-Z./@:~?&=_-]+)"
re.Global = True
re.IgnoreCase = True
' ASP seems to be not supporting .MultiLine method.
're.MultiLine = True
content = re.Replace(content,"<a target=_blank href='http://$1'>https://$1</a>")
' Second Pass for mail
re.Pattern = "([_0-9a-zA-Z-]+(\.[_0-9a-zA-Z-]+)*)@([0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*)"
AutoLink = re.Replace(content,"<a href='mailto:$1@$3'>$1@$3</a>")
end function
dim re
Set re = New RegExp
' First Pass for http
re.Pattern = "(\w+):\/\/([^/:]+)(:\d*\b)?([^# \n<]*).*\n"
re.Pattern = "([0-9a-zA-Z./@:~?&=_-]+)"
re.Pattern = "https://([0-9a-zA-Z./@:~?&=_-]+)"
re.Global = True
re.IgnoreCase = True
' ASP seems to be not supporting .MultiLine method.
're.MultiLine = True
content = re.Replace(content,"<a target=_blank href='http://$1'>https://$1</a>")
' Second Pass for mail
re.Pattern = "([_0-9a-zA-Z-]+(\.[_0-9a-zA-Z-]+)*)@([0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*)"
AutoLink = re.Replace(content,"<a href='mailto:$1@$3'>$1@$3</a>")
end function