#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?s)<url>\s*<loc>[^<]+login.+?</url>\s*"
Local $sString = "<url>" & @CRLF & _
"<loc>http://review-pref.ru/literatura/49/131/</loc>" & @CRLF & _
"<changefreq>monthly</changefreq>" & @CRLF & _
"<priority>0.3</priority>" & @CRLF & _
"</url>" & @CRLF & _
"<url>" & @CRLF & _
"<loc>http://review-pref.ru/folklor/4/178/4/javascript/login</loc>" & @CRLF & _
"<changefreq>monthly</changefreq>" & @CRLF & _
"<priority>0.3</priority>" & @CRLF & _
"</url>" & @CRLF & _
"<url>" & @CRLF & _
"<loc>http://review-pref.ru/literatura/56/65/login/javascript/login/login/</loc>" & @CRLF & _
"<changefreq>monthly</changefreq>" & @CRLF & _
"<priority>0.3</priority>" & @CRLF & _
"</url>" & @CRLF & _
"<url>" & @CRLF & _
"<loc>http://review-pref.ru/folklor/4/164/</loc>" & @CRLF & _
"<changefreq>monthly</changefreq>" & @CRLF & _
"<priority>0.3</priority>" & @CRLF & _
"</url>" & @CRLF & _
""
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