欢迎光临
我们一直在努力

REGULAR EXPRESSION IN VBSCRIPT-ASP教程,ASP应用

建站超值云服务器,限时71元/月

 

regular expression in vbscript
object regexp is used to create and execute regular expression

ex.
code:
strtarget=”test testing tested attest late start”
set objregexp= new regexp   create a regular expression

objregexp.pattern=”test*”   set the search pattern
objregexp.ignorecase=false  set the case sensitivity
objregexp.global=true       set the scope

set colmatches=objregexp.execute(strtarget)  execute the search

for each match in colmathes                  iterate the colmatches collection
 response.write “match found at position” & match.firstindex & “.”
 response.write “matched value is ” & match.value & “,<br>”
next

tested result:
match found at position 0. matched value is test.
match found at position 5. matched value is test.
match found at position 13. matched value is test.
match found at position 22. matched value is test.

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » REGULAR EXPRESSION IN VBSCRIPT-ASP教程,ASP应用
分享到: 更多 (0)