#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)(?<=<!-- Template Nav Start -->[\n])([\n\s\S]*?)(?=[\s\n]*?<!-- Template Nav End -->)"
Local $sString = "<!DOCTYPE html>" & @CRLF & _
"<html lang="en">" & @CRLF & _
"" & @CRLF & _
" <head>" & @CRLF & _
" <meta charset="UTF-8">" & @CRLF & _
" <meta http-equiv="X-UA-Compatible" content="IE=edge">" & @CRLF & _
" <meta name="viewport" content="width=device-width, initial-scale=1.0">" & @CRLF & _
" <meta property="og:site_name" content="WD Proposal">" & @CRLF & _
" <meta property="og:title" content="Your new outdoor living space.">" & @CRLF & _
" <meta property="og:image" content="https://www.WhitmerDecks.com/Proposal/eProposal/img/wdLogoName.png">" & @CRLF & _
" <meta property="og:description" content="Here you can view the proposal from Whitmer Decks, LLC">" & @CRLF & _
" </meta>" & @CRLF & _
"" & @CRLF & _
" <!-- General scripts & styles -->" & @CRLF & _
" <link rel="stylesheet" href="css/styles.css">" & @CRLF & _
" <link rel="stylesheet" href="css/cwBootstrap.css">" & @CRLF & _
" <script src="js/cwBootstrap.js" defer></script>" & @CRLF & _
"" & @CRLF & _
" <!-- Google Fonts -->" & @CRLF & _
" <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" rel="stylesheet">" & @CRLF & _
"" & @CRLF & _
" <!-- Page title and end of general head -->" & @CRLF & _
" <title>WD Proposal</title>" & @CRLF & _
"" & @CRLF & _
" <!-- Page specific scripts and styles -->" & @CRLF & _
" <script src="js/about.js" defer></script>" & @CRLF & _
" </head>" & @CRLF & _
"" & @CRLF & _
" <body>" & @CRLF & _
"" & @CRLF & _
" <!-- Template Nav Start -->" & @CRLF & _
" <nav>" & @CRLF & _
" <ul>" & @CRLF & _
" <li><a href="index.html">Home</a></li>" & @CRLF & _
" <li><a href="about.html">About</a></li>" & @CRLF & _
" <li>Item X</li>" & @CRLF & _
" <li>Item Y</li>" & @CRLF & _
" </ul>" & @CRLF & _
" </nav>" & @CRLF & _
" <!-- Template Nav End -->" & @CRLF & _
"" & @CRLF & _
" <p>" & @CRLF & _
" The about page" & @CRLF & _
" </p>" & @CRLF & _
"" & @CRLF & _
" </body>" & @CRLF & _
"" & @CRLF & _
"</html>"
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