#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)^((struct *[a-z0-9_]+)|[a-z0-9_]+) *[*a-z0-9_]+\((void|((((struct *[a-z0-9_]+)|[a-z0-9_]+) *[*a-z0-9_]+)(, ((struct *[a-z0-9_]+)|[a-z0-9_]+) *[*a-z0-9_]+)*))\)"
Local $sString = "int a_0(void)" & @CRLF & _
"int b_1(int a)" & @CRLF & _
"int c_2(int a, int b)" & @CRLF & _
"" & @CRLF & _
"void *xmalloc(size_t n)" & @CRLF & _
"" & @CRLF & _
"int main(int argc, char **argv)" & @CRLF & _
"" & @CRLF & _
"void *xmalloc(size_t n)" & @CRLF & _
"" & @CRLF & _
"void release(struct s_block)" & @CRLF & _
"" & @CRLF & _
"int a_(int a, int b)" & @CRLF & _
"int main(void)" & @CRLF & _
"" & @CRLF & _
"struct student get_student(char *name)" & @CRLF & _
"struct student *grow_2fast(struct student *s, int age_diff)" & @CRLF & _
"struct student *grow_2fast(struct student *s, struct hello age_diff)" & @CRLF & _
"int main(void)" & @CRLF & _
"" & @CRLF & _
"int print_me(int h1)" & @CRLF & _
"" & @CRLF & _
"/*" & @CRLF & _
"**int main(void)" & @CRLF & _
"*/"
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