#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)^<(?i)(?:input|textarea|\\w{0,}TextBox|\\w{0,}Field).*(?:name|id)=(?:\"|\')\w+(?:\"|\').*"
Local $sString = "{{! my-form.hbs }}" & @CRLF & _
"<form onsubmit={{action "submit"}}>" & @CRLF & _
"<label for="name">Name:</label>" & @CRLF & _
"<input type="text" id="name" value={{model.name}}>" & @CRLF & _
"" & @CRLF & _
" <label for="email">Email:</label>" & @CRLF & _
"<input type="email" id="email" value={{model.email}}>" & @CRLF & _
"" & @CRLF & _
" <label for="message">Message:</label>" & @CRLF & _
"<textarea id="message">{{model.message}}</textarea>" & @CRLF & _
"" & @CRLF & _
" <button type="submit">Submit</button>" & @CRLF & _
"</form>" & @CRLF & _
"" & @CRLF & _
"<html>" & @CRLF & _
" <head>" & @CRLF & _
" <title>My Form</title>" & @CRLF & _
" </head>" & @CRLF & _
" <body>" & @CRLF & _
" <form>" & @CRLF & _
" <label for="name">Name:</label>" & @CRLF & _
"<input type="text" name="name" id="name"/>" & @CRLF & _
" <label for="email">Email:</label>" & @CRLF & _
"<input type="email" name="email" id="email"/>" & @CRLF & _
" <label for="message">Message:</label>" & @CRLF & _
"<textarea name="message" id="message"></textarea>" & @CRLF & _
" <button type="button" onclick="submitForm()">Submit</button>" & @CRLF & _
" </form>" & @CRLF & _
" </body>" & @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