欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片



Length 屬性

返回在字符串搜索中找到的匹配的長度。

object.Length

object 參數(shù)總是一個 Match 對象。

說明

下面的代碼說明了 Length 屬性的用法:

Function RegExpTest(patrn, strng)
Dim regEx, Match, Matches      ' 建立變量。
 Set regEx =New RegExp         ' 建立正則表達式。
 regEx.Pattern =patrn         ' 設(shè)置模式。
 regEx.IgnoreCase =True         ' 設(shè)置是否區(qū)分大小寫。
 regEx.Global =True         ' 設(shè)置全程可用性。
 Set Matches =regEx.Execute(strng)   ' 執(zhí)行搜索。
 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"))

要求

版本 5

請參閱

FirstIndex 屬性 | Value 屬性

應(yīng)用于: Match 對象

返回首頁