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

VBS教程:VBscript屬性-FirstIndex 屬性

 更新時(shí)間:2006年11月16日 00:00:00   作者:  

FirstIndex 屬性

返回在搜索字符串中匹配的位置。

object.FirstIndex

object 參數(shù)總是一個(gè) Match 對(duì)象。

說(shuō)明

FirstIndex 屬性使用從零起算的偏移量,該偏移量是相對(duì)于搜索字符串的起始位置而言的。換言之,字符串中的第一個(gè)字符被標(biāo)識(shí)為字符 0。 下面的例子說(shuō)明了 FirstIndex 屬性的用法:

~Function RegExpTest(patrn, strng)  Dim regEx, Match, Matches         ' 建立變量。  Set regEx = New RegExp         ' 建立正則表達(dá)式。  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 & ". Match Value is "'    RetStr = RetStr & Match.Value & "'." & vbCRLF  Next  RegExpTest = RetStrEnd FunctionMsgBox(RegExpTest("is.", "IS1 is2 IS3 is4"))

相關(guān)文章

最新評(píng)論