#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)(¬zinit)(?<remaining_command>(?<simple_remaining>.+$(?<![\\'"]))|(?<continuation_line>.+(?<continuation>(?<slash_continuation>[\\]\n)|(?<quoted_continuation>["]\n[\s\S]*(?<!(?:[\\]{2})*[^\\])["])))*.+)"
Local $sString = "¬zinit light-mode for \" & @CRLF & _
" psprint/zsh-cmd-architect \" & @CRLF & _
" psprint/zsh-editing-workbench" & @CRLF & _
"" & @CRLF & _
"¬zinit light-mode for agkozak/zhooks" & @CRLF & _
"" & @CRLF & _
"¬zinit atclone"dircolors -b LS_COLORS > c.zsh" \" & @CRLF & _
" atpull'%atclone' \" & @CRLF & _
" pick"c.zsh" \" & @CRLF & _
" nocompile'!' \" & @CRLF & _
" atload'zstyle ":completion:*" list-colors "${(s.:.)LS_COLORS}"' \" & @CRLF & _
" for disco0/LS_COLORS" & @CRLF & _
"" & @CRLF & _
"¬zinit atclone"" & @CRLF & _
" autoload -Uz \${PWD}/functions/zcolors || {" & @CRLF & _
" builtin print -Pu2 -- \" & @CRLF & _
" '%F{1} \"WARNING: Failed to autoload zcolors command for initialization.%f\";" & @CRLF & _
" return 1" & @CRLF & _
" };" & @CRLF & _
" zcolors $LS_COLORS >! ~/.zsh/zcolors.zsh" & @CRLF & _
" " \" & @CRLF & _
" atpull'%atclone' \" & @CRLF & _
" pick"c.zsh" \" & @CRLF & _
" nocompile'!' \" & @CRLF & _
" atload'zstyle ":completion:*" list-colors "${(s.:.)LS_COLORS}"' \" & @CRLF & _
" for marlonrichert/zcolors" & @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