#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?m)<\?xml version="1\.0" encoding="UTF-8"\?>\s*<\s*([^\s]*)(?:.|\s)*<\/\s*\1\s*>"
Local $sString = "--------------------------3cbec9ce8f05" & @CRLF & _
"Content-Disposition: form-data; name="owServerData"; filename="details.xml"" & @CRLF & _
"Content-Type: text/plain" & @CRLF & _
"" & @CRLF & _
"<?xml version="1.0" encoding="UTF-8"?>" & @CRLF & _
"<Devices-Detail-Response xmlns="http://www.example.com" " & @CRLF & _
" <device>a</device>" & @CRLF & _
" <info>abc</info>" & @CRLF & _
" <test1><u>123</u><v>456</v><z/></test1>" & @CRLF & _
"</Devices-Detail-Response>" & @CRLF & _
"------------------------------3cbec9ce8f05--"
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