#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?mx)\s*" & @CRLF & _
" (" & @CRLF & _
" (?<type>int(?:\s+long|\s+short)?|double(?:\s+long)?|" & @CRLF & _
" long(?:\s+int|\s+double)?|short(?:\s+int)?|float|char)" & @CRLF & _
" |" & @CRLF & _
" (?<error>\w+|\w+\s*\,)" & @CRLF & _
" )" & @CRLF & _
" \s+" & @CRLF & _
" (?:" & @CRLF & _
" (?:" & @CRLF & _
" (?:" & @CRLF & _
" (?<error>int|double|float|char|long|short|[^,;a-zA-Z_].+?|[^,;]+?(?:\s+\w+?)+)" & @CRLF & _
" |" & @CRLF & _
" (?<id>[a-zA-Z_][a-zA-Z_0-9]*)" & @CRLF & _
" )" & @CRLF & _
" (?:\s*\[\s*[1-9]\d*\s*\])*" & @CRLF & _
" )" & @CRLF & _
" \s*" & @CRLF & _
" (?:\,\s*|(?=\;))" & @CRLF & _
" )+" & @CRLF & _
"\s*\;\s*"
Local $sString = "int " & @CRLF & _
" abv, cde, doub1lel,ded, cto, int1;" & @CRLF & _
"float ng23423, _ga45, " & @CRLF & _
"astories; " & @CRLF & _
"int af , f;" & @CRLF & _
"int a, b, c;int short alt ;" & @CRLF & _
"long double fgd [ 1 ], [1] , wef ;" & @CRLF & _
"char _a[1], fi [" & @CRLF & _
" 3 " & @CRLF & _
" ] [ 10] [ 4 ] ,g[1];int qw;"
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