UBB 转换函数演示(9)_Dreamweaver教程

编辑Tag赚U币
教程Tag:暂无Tag,欢迎添加,赚取U币!
mailto:$2"">$2</A>")
re.Pattern="(\[EMAIL=(.[^\*)\])(.*?)(\[\/EMAIL\])"
strContent= re.Replace(strContent,"<img align=absmiddle src=pic/email1.gif><A HREF=""mailto:$2"" TARGET=_blank>$3</A>")

re.Pattern = "^(http://[A-Za-z0-9\./=\?%\-&_~`@': !] )"
strContent = re.Replace(strContent,"<img align=absmiddle src=pic/url.gif><a target=_blank href=$1>$1</a>")
re.Pattern = "(http://[A-Za-z0-9\./=\?%\-&_~`@': !] )$"
strContent = re.Replace(strContent,"<img align=absmiddle src=pic/url.gif><a target=_blank href=$1>$1</a>")
re.Pattern = "(<BR>|<P>)(http://[A-Za-z0-9\./=\?%\-&_~`@': !] )(<BR>|<P>)"
strContent = re.Replace(strContent,"$1<img align=absmiddle src=pic/url.gif><a target=_blank href=$2>$2</a>$3")
re.Pattern = "^(ftp://[A-Za-z0-9\./=\?%\-&_~`@': !] )"
strContent = re.Replace(strContent,"<img align=absmiddle src=pic/url.gif><a target=_blank href=$1>$1</a>")
re.Pattern = "(ftp://[A-Za-z0-9\./=\?%\-&_~`@': !] )$"
strContent = re.Replace(strContent,"<img align=absmiddle src=pic/url.gif><a target=_blank href=$1>$1</a>")
re.Pattern = "[^>=""](ftp://[A-Za-z0-9\.\/=\?%\-&_~`@': !] )"
strContent = re.Replace(strContent,"<img align=absmiddle src=pic/url.gif><a target=_blank href=$1>$1</a>")
re.Pattern = "^(rtsp://[A-Za-z0-9\./=\?%\-&_~`@': !] )"
strContent = re.Replace(strContent,"<img align=absmiddle src=pic/url.gif><a target=_blank href=$1>$1</a>")
re.Pattern = "(rtsp://[A-Za-z0-9\./=\?%\-&_~`@': !] )$"
strContent = re.Replace(strContent,"<img align=absmiddle src=pic/url.gif><a target=_blank href=$1>$1</a>")
re.Pattern = "[^>=""](rtsp://[A-Za-z0-9\.\/=\?%\-&_~`@': !] )"
strContent = re.Replace(strContent,"<img align=absmiddle src=pic/url.gif><a target=_blank href=$1>$1</a>")
re.Pattern = "^(mms://[A-Za-z0-9\./=\?%\-&_~`@': !] )"
strContent = re.Replace(strContent,"<img align=absmiddle src=pic/url.gif><a target=_blank href=$1>$1</a>")
re.Pattern = "(mms://[A-Za-z0-9\./=\?%\-&_~`@': !] )$"
strContent = re.Replace(strContent,"<img align=absmiddle src=pic/url.gif><a target=_blank href=$1>$1</a>")
re.Pattern = "[^>=""](mms://[A-Za-z0-9\.\/=\?%\-&_~`@': !] )"
strContent = re.Replace(strContent,"<img align=absmiddle src=pic/url.gif><a target=_blank href=$1>$1</a>")

if strIcons = "1" then '笑脸转换
re.Pattern="(\["&ImgName&"(.*?)\])"

来源:网上收集//所属分类:Dreamweaver教程/更新时间:2005-05-04
相关Dreamweaver教程