用asp+xmlhttp编写web采集程序(14)
" ''查找不以http://开头的地址
str=checkexp(re,str,"$1 <a href=''http://$2'' target=_blank>$2</a> ")
re="([^(=)])((\w)+[@]{1}((\w)+[.]){1,3}(\w)+)" ''查找邮件地址
str=checkexp(re,str," <a href=''mailto:$2''>$2</a> ")
re="\[color=(((\w)+)|][#][0-F]{6})\]((.)+)\[\/color\]" ''替换字体色彩
str=checkexp(re,str,"<font color=''$1''>$4</font>")
re="\[size=(][0-9]{1})\]((.)+)\[\/size\]" ''替换字体大小
str=checkexp(re,str,"<font size=''$1''>$2</font>")
re="\[font=((.)+){1,3}\]((.)+)\[\/font\]" ''替换字体
str=checkexp(re,str,"<font face=''$1''>$3</font>")
re="(\[b\])(.+)(\[\/b\])" ''加粗字体
str=checkexp(re,str,"<b>$2</b>")
re="(\[u\])(.+)(\[\/u\])" ''下画线
str=checkexp(re,str,"<u>$2</u>")
re="(\[li\])(.+)(\[\/li\])" ''列表
str=checkexp(re,str,"<li>$2</li>")
re="(\[QUOTE\])(.+)(\[\/QUOTE\])" ''引用
str=checkexp(re,str,"_
<BLOCKQUOTE>引用:<HR SIZE=1>$2<HR SIZE=1></BLOCKQUOTE>")
re="\[@]{1}((\w)+[.]){1,3}(\w)+)\](.+)(\[\/email\])" ''邮件
str=checkexp(re,str,"<a href=mailto:$1>$6</a>")
re="(\[center\])(.+)(\[\/center\])" ''居中
str=checkexp(re,str,"<center>$2</center>")
re="fuck"
str=checkexp(re,str,"***")
re="操"
str=checkexp(re,str,"***")
re="sex"
str=checkexp(re,str,"***")
re="TMD"
str=checkexp(re,str,"***")
re="shit"
str=checkexp(re,str,"***")
ReThestr=str
end function
内容版权声明:除非注明,否则皆为本站原创文章。