#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "((((?P<Keys>dword|word|byte|int)[ \n\t]+)((?P<Names>[a-zA-Z0-9 _\-\$]+)))((\[(?P<Range>[a-zA-Z0-9 \t\n]+)\][ \t\n]+)|(?P<Pointer>[* \t\n]+)|)((=[ \n\t]+)([&*"a-zA-Z0-9]+))(;))|(((?P<Others>int|string|word)[ \t\n]+)([a-zA-Z0-9\n\t]+)(;))"
Local $sString = "; When you use static method ;;; " & @CRLF & _
"dword moses = 25;" & @CRLF & _
"word $him-moses_christ = 344;" & @CRLF & _
"byte second[ 20 ] = 89;" & @CRLF & _
"int th * = "moses";" & @CRLF & _
"int moses;" & @CRLF & _
"int moses = "christ";" & @CRLF & _
"int moses [54] = christ;" & @CRLF & _
"calls with a large number of" & @CRLF & _
"regular expressions. " & @CRLF & _
"By default, the regular expression engine caches " & @CRLF & _
"the 15 most recently used static regular expressions. " & @CRLF & _
"If your application uses more than 15 static regular expressions, " & @CRLF & _
"some regular expressions must be recompiled. To prevent this recompilation," & @CRLF & _
" you can increase the Regex.CacheSize property.(\[([a-zA-Z0-9 ]+)\])|([*]+)|[])"
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