#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?m)^(?=.*\bDATA1="(?<d1>[^"]+)"\h*)?(?=.*\bDATA2="(?<d2>[^"]+)"\h*)?(?=.*\bDATA3="(?<d3>[^"]+)"\h*)?(?=.*\bDATA4="(?<d4>[^"]+)"\h*)?(?=.*\bDATA5="(?<d5>[^"]+)"\h*)?.*"
Local $sString = "DATA1="8DE" DATA2="322" DATA3="20" DATA4="19.99" DATA5="0.01"" & @CRLF & _
"DATA1="FE4" DATA2="222" DATA4="400" DATA3="400" DATA5="0.00"" & @CRLF & _
"DATA1="CE3" DATA2="444" DATA4="60" DATA5="0.00" DATA3="60"" & @CRLF & _
"DATA1="MME" DATA3="20" DATA4="20" DATA5="0.00"" & @CRLF & _
"DATA2="667" DATA4="30" DATA3="30" DATA5="0.00" DATA1="MH4""
Local $sSubst = "${d1}\t\t${d2}\t\t${d3}\t\t${d4}\t\t${d5}"
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