ASP源码
PHP源码
.NET源码
JSP源码
'把pattern 又修改了下
'code要检测的代码
'http://www.downcodes.com/asp.asp
'leixing html 或者ubb
'nopic 代码没有图片时默认值
function toppic(code,leixing,nopic)
set regex = new regexp
re***.ignorecase = true
re***.global = true
if leixing = "html" then
re***.pattern = "]+)"
else
re***.pattern = "[img]([^u005B]+)“
end if
set matches = re***.execute(code)
if re***.test(code) then
if leixing = "html" then
toppic = matches(0).submatches(3)
else
toppic = matches(0).submatches(0)
end if
else
toppic = nopic
end if
end function
code1 = ""
pic = toppic(code1,"html","nopic.gif")
re***nse.Write pic