#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)\s(?:(?:\w+::)*(\w+)(?:<[\w, ]+>){0,1}::){0,1}(\w+)[(]"
Local $sString = "void rmdt::Worker<T_Channel, T_TransportControl>::setOption(rmdt::SockOpt, int64_t) [with T_Channel = iptransport::udp::Socket; T_TransportControl = rmdt::AggressiveTransportControl; int64_t = long int]" & @CRLF & _
"" & @CRLF & _
"std::error_code rmdt::ReceiveHandler<T_Channel>::internalRunSenderPart(int32_t) [with T_Channel = iptransport::udp::Socket; int32_t = int]" & @CRLF & _
"" & @CRLF & _
"void dex::rmdt::Worker::setOption(rmdt::SockOpt, int64_t)" & @CRLF & _
"" & @CRLF & _
"void Worker::setOption(rmdt::SockOpt, int64_t)" & @CRLF & _
"" & @CRLF & _
"std::pair <HandshakeRequestPayload,int64_t> rmdt::HandshakeAcceptor<T_Channel, T_Val>::receiveHandshake(int)" & @CRLF & _
"" & @CRLF & _
"std::vector<std::__cxx11::basic_string<char> > rmdt::Worker<T_Channel, T_TransportControl>::connect() [with T_Channel = iptransport::udp::Socket; T_TransportControl = rmdt::BQLLP] " & @CRLF & _
"" & @CRLF & _
"dex::type dex::func(int d)" & @CRLF & _
"" & @CRLF & _
"void func(int d)"
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