日期:2014-05-17  浏览次数:21037 次

关于正则表达式语法错误,是怎么回事呀?
ListUrl= "asddf234asd   "
Set   re   =   New   RegExp  
re.Pattern   =   "(? <=sd)\w+(?=as) "

本来我的目的是要查找到“df234”的结果。

(? <=exp)它指的就是符合前缀为exp的文字,但不包含exp本身



------解决方案--------------------
ListUrl= "asddf234asd "
Set re = New RegExp
re.Pattern = "sd(\w+)(?=as) "
re.IgnoreCase = True
re.Global = True
Set Matches = re.Execute(ListUrl)
For Each Match in Matches
Response.Write Match.SubMatches(0)& " <br> "
Next