#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?i)(<(/|)(!--|div|span|a|img|p)[^>]*>(\n|)| )"
Local $sString = "mass <=45 and >=30g" & @CRLF & _
"Contrary to <FM>" & @CRLF & _
"reading < 2 DAC hours ... reading > 2 DAC hours" & @CRLF & _
"Landon <lando@master.lanl.gov>" & @CRLF & _
"<!-- this is an html comment -->" & @CRLF & _
"<DIV>" & @CRLF & _
"<div></div>" & @CRLF & _
"<p>" & @CRLF & _
"<P>" & @CRLF & _
"<SPAN>" & @CRLF & _
"<span style="stuff and yo">" & @CRLF & _
"<a href=""><img src="https://lanl.com"></a>" & @CRLF & _
"Here is: more text"
Local $sSubst = ""
Local $sResult = StringRegExpReplace($sString, $sRegex, $sSubst)
MsgBox($MB_SYSTEMMODAL, "Result", $sResult)
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