| 操作系统 办公 实用知识 设计 开发 WEB开发 移动开发 数据库 软件工程 网管 安全 管理 信息化 答疑 渠道 |
VBScript IgnoreCase 属性IgnoreCase 属性 设置或返回一个Boolean值,指明模式搜索是否区分大小写。 object.IgnoreCase [= True | False ] Object 参数总是一个 RegExp 对象。如果搜索是区分大小写的,则 IgnoreCase 属性为 False;否则为 True。缺省值为 False。 说明 下面的代码说明了 IgnoreCase 属性的用法(改变赋予 IgnoreCase 属性的值以观察其效果): Function RegExpTest(patrn, strng) Dim regEx,Match,Matches '' 建立变量。 Set regEx = New RegExp '' 建立正则表达式。 regEx.Pattern = patrn '' 设置模式。 regEx.IgnoreCase = True '' 设置不区分大小写。regEx.Global=True '' 设置全局可用性set matches=regExExecute(string ) '' 执行搜索。for each match in matches '' 重复匹配集合RetStr=RetStr &Match found at position RetStr=RetStr&Match.FirstIndex&.Match Value is ''RetStr=RetStr&Match.Value&''.&vbCRLF NextRegExpTest=RetStrEnd FunctionMsgBox(RegExpTest(is., IS1 is2 IS3 is4))
今日推荐
|
重点推荐
领军企业技术文库
+更多领军技术文库
最新专题
电子杂志订阅
| ||||||||