#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?m)[\w\d]+\/(\d+)\/\d+\/\d+"
Local $sString = "R01/10000304603/000/00 " & @CRLF & _
"2235011: R01/10000304604/000/00" & @CRLF & _
"2235021: R01/10000304605/000/00" & @CRLF & _
"2235031: R01/10000304606/000/00" & @CRLF & _
"2235601: R01/10000304607/000/00" & @CRLF & _
"2235611: R01/10000304608/000/00" & @CRLF & _
"2235621: R01/10000304610/000/00" & @CRLF & _
"2235631: R01/10000304611/000/00" & @CRLF & _
""
Local $sSubst = "\t<\1>\n\t\t\2\t</\1>\n</\4>\n"
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