#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?mxX)^" & @CRLF & _
"#whitespace" & @CRLF & _
"([ ]*)" & @CRLF & _
"(?:" & @CRLF & _
" # Error position - line location " & @CRLF & _
" (-{6,})([\^])" & @CRLF & _
" |" & @CRLF & _
" # Line number" & @CRLF & _
" ([\d]+)" & @CRLF & _
" # Line number delim" & @CRLF & _
" ([\|])" & @CRLF & _
" # Code indent" & @CRLF & _
" ([ \t]*)" & @CRLF & _
" (?:" & @CRLF & _
" # Comment ?" & @CRLF & _
" ([\/]{2}.+)?" & @CRLF & _
" |" & @CRLF & _
" # Else code block line" & @CRLF & _
" (.*)" & @CRLF & _
" )" & @CRLF & _
" $" & @CRLF & _
")" & @CRLF & _
"|" & @CRLF & _
"# Function delim token" & @CRLF & _
"(at +)" & @CRLF & _
"# Function" & @CRLF & _
"(.+?)" & @CRLF & _
"# (, Path base" & @CRLF & _
"([\(].+?)" & @CRLF & _
"# File" & @CRLF & _
"([^\/]+?)" & @CRLF & _
"# Line:char" & @CRLF & _
"(?:(:)(\d+))?" & @CRLF & _
"(?:(:)(\d+))?" & @CRLF & _
"# Function path" & @CRLF & _
"([\)])"
Local $sString = " watching /Users/disk0/.nvm/versions/node/v13.2.0/lib/node_modules/stylus/lib/functions/index.styl" & @CRLF & _
"ParseError: inject/code-custom.styl:125:44" & @CRLF & _
" 121| else" & @CRLF & _
" 122| // Add room for window controls" & @CRLF & _
" 123| body.mac " & @CRLF & _
" 124| // Only target first tab bar" & @CRLF & _
" 125| [data-keybinding-context="1"] .tabs-and-actions-container" & @CRLF & _
"---------------------------------------------------^" & @CRLF & _
" 126| & .tabs-and-actions-container" & @CRLF & _
" 127| padding-left: 9em" & @CRLF & _
" 128| & .dragging-area-left-padding" & @CRLF & _
"" & @CRLF & _
"expected ":", got ")"" & @CRLF & _
"" & @CRLF & _
" at Parser.error (/Users/disk0/.nvm/versions/node/v13.2.0/lib/node_modules/stylus/lib/parser.js:259:11)" & @CRLF & _
" at Parser.expect (/Users/disk0/.nvm/versions/node/v13.2.0/lib/node_modules/stylus/lib/parser.js:287:12)" & @CRLF & _
" at Parser.ternary (/Users/disk0/.nvm/versions/node/v13.2.0/lib/node_modules/stylus/lib/parser.js:1964:12)" & @CRLF & _
" at Parser.negation (/Users/disk0/.nvm/versions/node/v13.2.0/lib/node_modules/stylus/lib/parser.js:1953:17)" & @CRLF & _
" at Parser.expression (/Users/disk0/.nvm/versions/node/v13.2.0/lib/node_modules/stylus/lib/parser.js:1932:24)" & @CRLF & _
" at Parser.ternary (/Users/disk0/.nvm/versions/node/v13.2.0/lib/node_modules/stylus/lib/parser.js:1963:27)" & @CRLF & _
" at Parser.negation (/Users/disk0/.nvm/versions/node/v13.2.0/lib/node_modules/stylus/lib/parser.js:1953:17)" & @CRLF & _
" at Parser.expression (/Users/disk0/.nvm/versions/node/v13.2.0/lib/node_modules/stylus/lib/parser.js:1932:24)" & @CRLF & _
" at Parser.primary (/Users/disk0/.nvm/versions/node/v13.2.0/lib/node_modules/stylus/lib/parser.js:2250:23)" & @CRLF & _
" at Parser.member (/Users/disk0/.nvm/versions/node/v13.2.0/lib/node_modules/stylus/lib/parser.js:2174:21)" & @CRLF & _
" compiled inject/FontLoad.css" & @CRLF & _
" watching inject/FontLoad.styl" & @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