当前位置:百问十四>百科知识>111abcd

111abcd

2024-09-11 09:26:44 编辑:join 浏览量:606

111abcd

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

版权声明:文章由 百问十四 整理收集,来源于互联网或者用户投稿,如有侵权,请联系我们,我们会立即处理。如转载请保留本文链接:https://www.baiwen14.com/article/329765.html
热门文章