function strCut(a)
dim re,kk,bb,cc
cc=""
set re=New Regexp
re.ignoreCase=true
re.global=true
re.pattern="111(\w+?)222"
set kk= re.execute(a)
for each bb in kk
if cc="" then
cc=re.replace(bb,"$1")&":"
else
cc=cc&re.replace(bb,"$1")
end if
next
strCut=split(cc,":")
end function
response.write strCut("111abcd222QQQQQQ111abcedws222aaaasd")(0)
response.write chr(13)
response.write strCut("111abcd222QQQQQQ111abcedws222aaaasd")(1)
%>
<%
function strCut(a)
dim re,kk,bb,cc
cc=""
set re=New Regexp
re.ignoreCase=true
re.global=true
re.pattern="111(\w+?)222"
set kk= re.execute(a)
for each bb in kk
if cc="" then
cc=re.replace(bb,"$1")&":"
else
cc=cc&re.replace(bb,"$1")
end if
next
strCut=split(cc,":")
end function
response.write strCut("111abcd222QQQQQQ111abcedws222aaaasd")(0)
response.write chr(13)
response.write strCut("111abcd222QQQQQQ111abcedws222aaaasd")(1)
%>
用数组+正则
我去处理代码
标签:111abcd