例子1:
dim $aaa[3]
$aaa[0]=1
$aaa[1]=2
$aaa[2]=3
for $i = 0 to UBound($aaa) - 1
msgbox(0, "RegExp Test with Option 1 - " & $i, $aaa[$i])
Next
msgbox(0, "RegExp Test with Option 1 - " & $i, $aaa[$i])
例子1中MSGBOX 中的$I是可以正确显示的
例子2:
$nOffset = 1
While 1
$array = StringRegExp('<test>a</test> <test>b</test> <test>c</Test>', '<(?
i)test>(.*?)</(?i)test>', 1, $nOffset)
If @error = 0 Then
$nOffset = @extended
Else
ExitLoop
EndIf
for $i = 0 to UBound($array) - 1
msgbox(0, "RegExp Test with Option 1 - " & $i, $array[$i])
Next
WEnd
msgbox(0, "RegExp Test with Option 1 - " & $i, $array[$i])
例子2 的MSGBOX的$i无法正确显示 总是显示0
顺便说下 例子2是帮助里的例子~
[ 本帖最后由 lsq726 于 2008-8-26 05:59 编辑 ] |