<%
respons.write(server.htmlencode(fiximg( "<imgonclick =" "」if(this.width> screen.width-461)風OW.Open( 'QQ/20082181405371.jpg');
%>
<%
'功能:将img
functionfiximg(sstring)
DimsReallydo、Regex、Ireallydo
dimomatches、cmatch
dimtstarttime、Tendtime
ifisnull(sstring)then
fiximg = ""
exitFunction
endif
SREALLYDO = SSTRING
onerrorresumenext
sreallydo = falple(sreallydo、vbcr "")
sreallydo = falple(sreallydo、vblf "")
sreallydo = falple(sreallydo、vbtab、 "")
sreallydo = falple(sreallydo、 "<img"、vbcrlf& "<img"、1、-1,1)
SREALLYDO = facty(sreallydo、 "/>"、 "/>"、1、-1,1)
sreallydo = applecteall(sreallydo、 "="、 "="、true)
sreallydo = applecteall(sreallydo、 ">"、 ">"、true)
SREALLYDO = facter(sreallydo、 "> <"、 ">"&vbcrlf& "<")
SREALLYDO = TRIM(SREALLYDO)
onerrorgoto0
setRegex = newRegexp
regex.ignorecase = true
regex.global = true
'//
regex.pattern = "/s [on]。+?=([/" "| /'](。*?)/1"
sreallydo = regex.replace(sreallydo、 "")
'//将src不带引号的图片地址加上引号
regex.pattern = "<img。*?/ssrc =([^/"/'/s] [^/""/'/s>]*)。*?> "
sreallydo = regex.replace(sreallydo、 "<imgsrc =" "$ 1" "/>")
'//正则匹配图片src地址
regex.pattern = "<img。*?/ssrc =([/" "/'])([^/" "/']+?)/1。*?>"
sreallydo = regex.replace(sreallydo、 "<imgsrc =" "$ 2" "/>")
fiximg = sreallydo
エンド機能