#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(\d+)\s+([A-Z]+)(\d+)\s+(\w+)"
Local $sString = "6876786786 GFS8978976 I" & @CRLF & _
"6786786767 DDF78676 I" & @CRLF & _
"4343245443 SBSSK67676 I" & @CRLF & _
"8393372263 SBSSK56565 I" & @CRLF & _
"6545434347 DDF7878333 I" & @CRLF & _
"6757650000 SBSSK453 I"
Local $sSubst = "$1+$2+$3+$4"
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