返回开始搜索字符串与结束搜索字符串之间的字符串.
#include <String.au3>
_StringBetween($s_String, $s_Start, $s_End [, $v_Case =
-1])
$s_String | 搜索的字符串. |
$s_Start | 开始位置的字符串. 留空则从(文本)起点开始搜索 |
$s_End | 结束位置的字符串. 留空则从 $s_Start 指定点到(文本)终点搜索 |
$v_Case | [可选参数] 区分大小写的搜索. 默认(Default)或 -1, 不区分大小写; 否则区分大小写. |
成功: | 返回 0 基一维数组, $array[0] 为第一个匹配的字符串.(不包括搜索字符串). |
失败: | 返回 0 |
@error: | 1 - 没有找到字符串. |
#include <String.au3>
#include <Array.au3>
_Main()
Func _Main()
Local
$aArray1 =
_StringBetween('[18][20][3][5][500][60]',
'[', ']')
_ArrayDisplay($aArray1, '默认搜索')
EndFunc ;==>_Main
provider with jb51.net (unicode) |