... string between and position where found
#include <Array.au3>
#include <String.au3>
Example()
Func Example()
$sMyString = "[18]zero[20]hello18[18]example[5]one[500]two[60]"
$aResult = _StringBetweenAndPos($sMyString, "[", "]")
_ArrayDisplay($aResult)
EndFunc ;==>Example
Func _StringBetweenAndPos($sMyString, $sDelim1, $sDelim2)
Local $aArray = _StringBetween($sMyString, $sDelim1, $sDelim2)
If @error Then Return SetError(1, 0, "")
Local $aResult[UBound($aArray)][2], $iStart = 1
For $i = 0 To UBound($aArray) - 1
$aResult[$i][0] = $aArray[$i]
$aResult[$i][1] = StringInStr($sMyString, $sDelim1 & $aResult[$i][0] & $sDelim2, 0, 1, $iStart) + 1
$iStart = $aResult[$i][1]
Next
Return $aResult
EndFunc ;==>_StringBetweenAndPos
edit
new listing debugged