| 操作系统 办公 实用知识 设计 开发 WEB开发 移动开发 数据库 软件工程 网管 安全 管理 信息化 答疑 渠道 |
VBScript Length 属性Length 属性 返回在字符串搜索中找到的匹配的长度。 object.Length object 参数总是一个 Match 对象。 说明 Function RegExpTest(patrn, strng) Dim regEx, Match, Matches '' 建立变量。 Set regEx = New RegExp '' 建立正则表达式。 regEx.Pattern = patrn '' 设置模式。 regEx.IgnoreCase = True '' 设置是否区分大小写。 regEx.Global = True '' 设置全程可用性。 Set Matches = regEx.Execute(strng) '' 执行搜索。 For Each Match in Matches '' 遍历 Matches 集合。 RetStr = RetStr & 匹配 & I & 位于 RetStr = RetStr & Match.FirstIndex & 。匹配的长度为 RetStr = RetStr & Match.Length RetStr = RetStr & 个字符。 & vbCRLF Next RegExpTest = RetStrEnd FunctionMsgBox(RegExpTest(is., IS1 is2 IS3 is4))
今日推荐
|
重点推荐
领军企业技术文库
+更多领军技术文库
最新专题
电子杂志订阅
| ||||||||