Regular Expression
1. 匹配 URL 并替换, www. 不超过四可正常工作, 或者说不超过三级域名, 本正则可正常工作2. email 替换操作, 三级域名或以内, 本正则正常工作
---/---------------------------------------------------------
2. email 替换操作, 三级域名或以内, 本正则正常工作'email 替换操作, email 替换为 <a href=mailto:email>email</a>Set re = New RegExpre.Pattern = "([\w-]+\.+[\w-]+\@+)([\w-]+\.+[\w-]+\.+|[\w-]+\.+)([\w{1}][\w{2}][\w{3}]|[\w{1}][\w{2}])"re.Global = truere.IgnoreCase = trueresult = re.Replace(result,"<a href=mailto:$1$2$3>$1$2$3</a>")----------------------'EMAIL 解码Set re = New RegExpre.Pattern = "(\<a href\=mailto\:)([\w-]+\.+[\w-]+\@+)([\w-]+\.+[\w-]+\.+|[\w-]+\.+)([\w{1}][\w{2}][\w{3}]|[\w{1}][\w{2}])(\>)(.*)(\<\/a\>)"re.Global = truere.IgnoreCase = trueStr = re.Replace(Str,"$6")
1. 匹配 URL 并替换, www. 不超过四可正常工作, 或者说不超过三级域名, 本正则可正常工作'url 替换操作, www 替换为 <a href=http://www>www</a>Set re = New RegExpre.Pattern = "(http\:\/\/|^http\:\/\/)([\w-]+\.+[\w-]+\.+[\w-]+\.+[\w-]+|[\w-]+\.+[\w-]+\.+[\w-]+)(/[\w-./?%&=]*)?"re.Global = truere.IgnoreCase = trueresult = re.Replace(result,"<a href=http://$2$3 target=_blank>$1$2$3</a>")----------------------'URL 解码Set re = New RegExpre.Pattern = "(\<a href\=\http\:\/\/)([\w-]+\.+[\w-]+\.+[\w-]+\.+[\w-]+|[\w-]+\.+[\w-]+\.+[\w-]+)(/[\w-./?%&=]*)?( target\=\_blank\>)(http\:\/\/|^http\:\/\/)([\w-]+\.+[\w-]+\.+[\w-]+\.+[\w-]+|[\w-]+\.+[\w-]+\.+[\w-]+)(/[\w-./?%&=]*)?(/[\w-./?%&=]*)(\<\/a\>)"re.Global = truere.IgnoreCase = trueStr = re.Replace(Str,"$5$6$7$8")
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''