#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)([+-]) (~?\w+)|\(.*\) ?(?:: (.+))?"
Local $sString = " + Update () : void" & @CRLF & _
"" & @CRLF & _
" + KeyPress (key : int) : bool" & @CRLF & _
" + KeyRelease (key : int) : bool" & @CRLF & _
" + IsKeyDown (key : int) : bool" & @CRLF & _
"" & @CRLF & _
" + MousePress (button : int) : bool" & @CRLF & _
" + MouseRelease (button : int) : bool" & @CRLF & _
" + IsMouseDown (button : int) : bool" & @CRLF & _
"" & @CRLF & _
" + GetMouseX () : int" & @CRLF & _
" + GetMouseY () : int" & @CRLF & _
"" & @CRLF & _
" + QuitRequested () : bool" & @CRLF & _
"" & @CRLF & _
" + GetInstance () : InputManager&" & @CRLF & _
"" & @CRLF & _
" - InputManager ()" & @CRLF & _
" - ~InputManager ()" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
" - mouseState : bool[6]" & @CRLF & _
" - mouseUpdate : int[6]" & @CRLF & _
"" & @CRLF & _
" - keyState : ler abaixo" & @CRLF & _
" - keyUpdate : ler abaixo" & @CRLF & _
"" & @CRLF & _
" - quitRequested : bool" & @CRLF & _
"" & @CRLF & _
" - updateCounter : int" & @CRLF & _
"" & @CRLF & _
" - mouseX : int" & @CRLF & _
" - mouseY : int" & @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