#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = ".*at \w+\.[A-Z] \(.+\n([\s\S]+\n)*.*(\[as realHandler]|<anonymous>)"
Local $sString = "Error" & @CRLF & _
" at Logger._s (/var/user/impl/lib/log.js:7:17)" & @CRLF & _
" at Logger.I (/var/user/impl/lib/log.js:26:22)" & @CRLF & _
" at getWxContext (/var/user/impl/route.js:136:7)" & @CRLF & _
" at route (/var/user/impl/route.js:19:13)" & @CRLF & _
" at EventHandler.exports.main [as realHandler] (/var/user/index.js:14:22)" & @CRLF & _
" at EventHandler.handle (/var/runtime/node8/bootstrap.js:401:28)" & @CRLF & _
" at invoke (/var/runtime/node8/bootstrap.js:204:22)" & @CRLF & _
" at Timeout.setTimeout [as _onTimeout] (/var/runtime/node8/bootstrap.js:133:9)" & @CRLF & _
" at ontimeout (timers.js:475:11)" & @CRLF & _
" at tryOnTimeout (timers.js:310:5)"
Local $aArray = StringRegExp($sString, $sRegex, $STR_REGEXPARRAYFULLMATCH)
; 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