#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(<FO_KEP>[^<]*<\/FO_KEP>)\r?\n(<OSSZESZERELESI_KEP>[^<]*<\/OSSZESZERELESI_KEP>)"
Local $sString = "<TERMEK>" & @CRLF & _
"<TERMEK_KOD>01008213</TERMEK_KOD>" & @CRLF & _
"<FO_KEP>https://www.temponabytok.sk/Files/obrazky/01008213.jpg</FO_KEP>" & @CRLF & _
"<OSSZESZERELESI_KEP>https://www.temponabytok.sk/Files/dokumenty/Vratko_montazny_navod.jpg</OSSZESZERELESI_KEP>" & @CRLF & _
"<OBRAZKY>https://www.temponabytok.sk/Files/2341000/2341428/245320712.jpg</OBRAZKY>" & @CRLF & _
"</TERMEK>"
Local $sSubst = "\2\n\1"
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