#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?x) (?:\[tab\s # looks for [tab + whitespace literally" & @CRLF & _
" | # or" & @CRLF & _
" (?!\A)\G\s) # (?!\A) = negative lookahead" & @CRLF & _
" # to make sure the following is not the start" & @CRLF & _
" # of the string" & @CRLF & _
" # \G matches at the end of the previous match" & @CRLF & _
" (?P<key>\w+) # match a word character greedily to group "key"" & @CRLF & _
" =" & @CRLF & _
" "(?P<value>[^"]+)" # " + anything not " + ", save this to group "value"" & @CRLF & _
" "
Local $sString = "some gibberish here [tab title="Emergency Contact" important="true"] some additional info here"
Local $aArray = StringRegExp($sString, $sRegex, $STR_REGEXPARRAYGLOBALFULLMATCH)
Local $aFullArray[0]
For $i = 0 To UBound($aArray) -1
_ArrayConcatenate($aFullArray, $aArray[$i])
Next
$aArray = $aFullArray
; Present the entire match result
_ArrayDisplay($aArray, "Result")
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for AutoIt, please visit: https://www.autoitscript.com/autoit3/docs/functions/StringRegExp.htm