最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

VBS教程:方法-Execute 方法

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

Execute 方法

對(duì)指定的字符串執(zhí)行正則表達(dá)式搜索。

object.Execute(string)

參數(shù)

object

必選項(xiàng)??偸且粋€(gè) RegExp 對(duì)象的名稱。

string

必選項(xiàng)。要在其上執(zhí)行正則表達(dá)式的文本字符串。

說(shuō)明

正則表達(dá)式搜索的設(shè)計(jì)模式是通過(guò) RegExp 對(duì)象的 Pattern 來(lái)設(shè)置的。

Execute 方法返回一個(gè) Matches 集合,其中包含了在 string 中找到的每一個(gè)匹配的 Match 對(duì)象。如果未找到匹配,Execute 將返回空的 Matches 集合。

下面的代碼說(shuō)明了 Execute 方法的用法。

Function RegExpTest(patrn, strng)  Dim regEx, Match, Matches      ' Create variable.  Set regEx = New RegExp         ' Create a regular expression.  regEx.Pattern = patrn         ' Set pattern.  regEx.IgnoreCase = True         ' Set case insensitivity.  regEx.Global = True         ' Set global applicability.  Set Matches = regEx.Execute(strng)   ' Execute search.  For Each Match in Matches      ' Iterate Matches collection.    RetStr = RetStr & "Match found at position "    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)論

克拉玛依市| 龙山县| 特克斯县| 监利县| 当雄县| 集安市| 长丰县| 邵阳县| 宁阳县| 涿鹿县| 义马市| 三都| 凌源市| 济源市| 仙居县| 绥滨县| 新巴尔虎右旗| 卢龙县| 建昌县| 沧源| 台北县| 合水县| 托里县| 双辽市| 平山县| 舒兰市| 高邑县| 和静县| 肥城市| 嵩明县| 西充县| 金山区| 车致| 广州市| 门源| 张家港市| 西吉县| 广安市| 罗平县| 黄梅县| 兰考县|