asp连接数据库代码实例(19)
发布时间:2021-06-06
发布时间:2021-06-06
asp 连接数据库代码实例
strContent= re.Replace(strContent,"<img align=absmiddle src=" & ImagePath & "email1.gif><A HREF=""mailto:$2"" TARGET=_blank>$3</A>")
'自动识别网址
're.Pattern = "^((http|https|ftp|rtsp|mms):(//|\\)[A-Za-z0-9./=?%-&_~`@':+!]+)" 'strContent = re.Replace(strContent,"<img align=absmiddle src=pic/url.gif border=0><a target=_blank href=$1>$1</a>")
're.Pattern = "((http|https|ftp|rtsp|mms):(//|\\)[A-Za-z0-9./=?%-&_~`@':+!]+)$" 'strContent = re.Replace(strContent,"<img align=absmiddle src=pic/url.gif border=0><a target=_blank href=$1>$1</a>")
're.Pattern = "([^>=""])((http|https|ftp|rtsp|mms):(//|\\)[A-Za-z0-9./=?%-&_~`@':+!]+)"
'strContent = re.Replace(strContent,"$1<img align=absmiddle src=pic/url.gif border=0><a target=_blank href=$2>$2</a>")
'自动识别www等开头的网址
're.Pattern = "([^(http://|http:\)])((www|cn)[.](w)+[.]{1,}(net|com|cn|org|cc)(((/[~]*|\[~]*)(w)+)|
[.](w)+)*(((([?](w)+){1}[=]*))*((w)+){1}([&](w)+[=](w)+)*)*)"
'strContent = re.Replace(strContent,"<img align=absmiddle src=pic/url.gif border=0><a target=_blank href=http://$2>$2</a>")
'自动识别Email地址,如打开本功能在浏览内容很多的帖子会引起服务器停顿 're.Pattern = "([^(=)])((w)+[@]{1}((w)+[.]){1,3}(w)+)"
'strContent = re.Replace(strContent,"<img align=absmiddle src=pic/url.gif border=0><a target=_blank href=""mailto:$2"">$2</a>")
re.Pattern="[em(.[^[]*)]"
strContent=re.Replace(strContent,"<img src="&ImagePath&"em$1.gif border=0 align=middle>")
re.Pattern="[HTML](.[^[]*)[/HTML]"
strContent=re.Replace(strContent,"<table width='100%' border='0' cellspacing='0' cellpadding='6' class=tableborder1><td><b>以下内容为程序代码:</b><br>$1</td></table>")
re.Pattern="[code](.[^[]*)[/code]"
strContent=re.Replace(strContent,"<table width='100%' border='0' cellspacing='0' cellpadding='6' class=tableborder1><td><b>以下内容为程序代码:</b><br>$1</td></table>")
re.Pattern="[color=(.[^[]*)](.[^[]*)[/color]"
strContent=re.Replace(strContent,"<font color=$1>$2</font>")
re.Pattern="[face=(.[^[]*)](.[^[]*)[/face]"
strContent=re.Replace(strContent,"<font face=$1>$2</font>")