#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?i)(?<=>[^<]*)(flyer)|(flyer)(?=[^>]*<)"
Local $sString = "flyertalk.com <a href="HTTPS://flyertalk.com">Flyer Talk website</a>" & @CRLF & _
"Forum <a href="HTTPS://www.flyertalk.com/forum/delta-air-lines-skymiles-665/">Delta</a>" & @CRLF & _
"----- <a href="HTTPS://www.flyertalk.com/forum/american-airlines-aadvantage-733/">AAA</a>" & @CRLF & _
"<u>Pneu</u> FLYER" & @CRLF & _
"- FLYER 40-622 <a href="HTTPS://www.veloplus.ch/AlleProdukte/Reifen/CityTourAlltag.aspx">TUB</a> FLYER"
Local $sSubst = "<u>$1$2</u>"
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