#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?:((\babstract\b\s)?)(T\s|\w+<?\w+<?\w+>?>?\s)(\w+<T>|[a-zA-Z0-9]+)(\(.*\))(\s=>\s\w+)?)"
Local $sString = "public void Something();" & @CRLF & _
"public List<int> SomethingElse();" & @CRLF & _
"private List<string> SomethingElseElse(One one);" & @CRLF & _
"private IEnumerable<List<string> Crazy(One one, Two two);" & @CRLF & _
"private IEnumerable<List<string> Crazy(One one, Two two) => AndSoOn;" & @CRLF & _
"public abstract void Run();" & @CRLF & _
"public T Get<T>(params object[] args)" & @CRLF & _
"private void rfrmBusyScreen_Load(object sender, EventArgs e)" & @CRLF & _
"public void Generate24HourSchedule(List<ScheduledEntry> scheduled)"
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