#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(.*?'hello'.*?),'hello',(.*)"
Local $sString = "'one',2,'three','hello','xyz',5,'hello','mnr','hello','axi'" & @CRLF & _
"'onae',2,'tree','hello','xyz',6,'hello','mnr','hello','asd'" & @CRLF & _
"'onee',2,'xdsa','hello','xyz',5,'hello','mnr','hello','aew'" & @CRLF & _
"'owne',2,'thr','hello','xyz',3,'hello','mnr','hello','az'" & @CRLF & _
"'ocne',2,'tee','hello','xyz',5,'hello','mnr','hello','zse'" & @CRLF & _
"'owne',2,'tre','hello','xyz',2,'hello','mnr','hello','aai'"
Local $sSubst = "$1,0,$2"
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