#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "([0-9]+)\s{6,}([A-Z ]+)\s+([0-9\.]+)\s+([0-9\.]+)\s+([0-9]+)"
Local $sString = "43034452 LONGSHIRTPAIETTE 17.30" & @CRLF & _
" 27.90 " & @CRLF & _
" 0110 " & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
" COLOR : : : : :" & @CRLF & _
" : : : " & @CRLF & _
" -11 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0" & @CRLF & _
"43034453 LONG SHIRT PAI ETTE 16.40" & @CRLF & _
" 25.90 " & @CRLF & _
" 0110 " & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
" COLOR : : : : :" & @CRLF & _
" : : : " & @CRLF & _
" -3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0" & @CRLF & _
"43034454 BASIC 4.99" & @CRLF & _
" 8.90 " & @CRLF & _
" 0110 " & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
" COLOR : : : : :" & @CRLF & _
" : : : " & @CRLF & _
" -5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"
Local $sSubst = "\1;\2;\3;\4;\5"
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