#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "((?# Capturing group for the type name)" & @CRLF & _
"\/+(?# Start with / or // )" & @CRLF & _
"[^\/\[\]]+(?# Type name exclusing start of attribute and next type)" & @CRLF & _
"(?:(?# Non-capturing group for the attribute)" & @CRLF & _
"\[(?# Start of an attribute)" & @CRLF & _
"[^\]']*(?# Anything but end of attribute or start of string)" & @CRLF & _
"(?:(?# non-capturing group for string)" & @CRLF & _
"'(?# string start)" & @CRLF & _
"[^']*(?# anything inside the string, except end of string)" & @CRLF & _
"'(?# string end)" & @CRLF & _
")(?# end of string group)" & @CRLF & _
"\](?# end of attribute)" & @CRLF & _
")?(?# Attribute can occur 0 or one time)" & @CRLF & _
")+(?# Type can occur once or many times)"
Local $sString = ""
Local $aArray = StringRegExp($sString, $sRegex, $STR_REGEXPARRAYFULLMATCH)
; 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