#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?<=(\w\w:)|(\w:)) (.*\n?)\1?\2?"
Local $sString = "a: 1, 2, 3" & @CRLF & _
"a: a, b, v" & @CRLF & _
"b: 5, 6, 7" & @CRLF & _
"b: 10, 1543, 1345" & @CRLF & _
"b: e, fe, sdf" & @CRLF & _
"cd: asdf, asdfas dfasdfa,asdfasdfa,afdsfa sdf" & @CRLF & _
"e1: asdfas, dafasd, adsf, asdfasd" & @CRLF & _
"e1: 1, 3, 2" & @CRLF & _
"e1: 9, 8, 7, 6" & @CRLF & _
""
Local $sSubst = "\t\3"
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