#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?s)(.*VPS_CUSTOMER.*VALUES \((?:.*,){14})(.*,)((.*,)*)(.*;)"
Local $sString = "INSERT INTO table (cola, colb, colc, cold, cole, colf, colg, colg, colh, coli, colj, colk, coll, colm, coln, colo, colp, colq, colr, cols, colt, culu) VALUES (1, '2', 3, NULL, '5', 6, '7', '8', 9, NULL, NULL, 12, '13', '14', '15', '16', '17', '18', '19', 20, '21', 22');" & @CRLF & _
"INSERT INTO table (cola, colb, colc, cold, cole, colf, colg, colg, colh, coli, colj, colk, coll, colm, coln, colo, colp, colq, colr, cols, colt, culu) VALUES (1, '2', 3, NULL, '5', 6, '7', '8', 9, NULL, NULL, 12, '13', '14', ' " & @CRLF & _
"" & @CRLF & _
" 15" & @CRLF & _
"" & @CRLF & _
" ', '16', '17', '18', '19', 20, '21', '22');"
Local $sSubst = "\1\3\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