#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)</?[\w]+([\s|\w]+\=\"[\s|\w|\.|\@|\%|\:|\/]*\")*>"
Local $sString = "<HTML>" & @CRLF & _
"" & @CRLF & _
"<HEAD>" & @CRLF & _
"" & @CRLF & _
"<TITLE>Your Title Here</TITLE>" & @CRLF & _
"" & @CRLF & _
"</HEAD>" & @CRLF & _
"" & @CRLF & _
"<BODY BGCOLOR="FFFFFF">" & @CRLF & _
"" & @CRLF & _
"<CENTER><IMG SRC="clouds.jpg" ALIGN="BOTTOM"> </CENTER>" & @CRLF & _
"" & @CRLF & _
"<HR>" & @CRLF & _
"" & @CRLF & _
"<a href="http://somegreatsite.com" name="asd" surname="">Link Name</a>" & @CRLF & _
"" & @CRLF & _
"<a href="https://somesite.com" name="" surname="100%">support@yourcompany.com</a>" & @CRLF & _
"" & @CRLF & _
"<P> This is a new paragraph!" & @CRLF & _
"" & @CRLF & _
"<P> <B>This is a new paragraph!</B>" & @CRLF & _
"" & @CRLF & _
"<BR> <B><I>This is a new sentence without a paragraph break, in bold italics.</I></B>" & @CRLF & _
"" & @CRLF & _
"<HR>" & @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