#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "([a-zA-Z0-9]=)|(\n\s*\{)|(\(\s)|(\s\))|(\s,)|(\n\s*\{)|(\t)|(\)\{)|(.{81,})|([a-zA-Z0-9][&|\+\-\*\/%]+[a-zA-Z0-9])|(class [a-z])|(class .*_)|( ;)|(==[a-zA-Z0-9])|([a-zA-Z0-9].=[a-zA-Z0-9])"
Local $sString = "Any "matches" here indicate a possible style error." & @CRLF & _
"" & @CRLF & _
"Please note that this is not 100% perfect (although we tried our best!)" & @CRLF & _
"" & @CRLF & _
"This may not catch everything, and may incorrectly catch others." & @CRLF & _
"If you believe there is an incorrect match, let us know" & @CRLF & _
"on the form when you submit your document." & @CRLF & _
"" & @CRLF & _
"Please ignore any matches within your comments or string literals." & @CRLF & _
"(i.e. you can break "coding style" in a comment)" & @CRLF & _
"" & @CRLF & _
"Thank you!"
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