#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?m)(?<spaceBefore>^[ \t]*)(?<function>SetColor|SetAlpha|DrawRect|Delay|Flip|SetScale|SetVirtualResolution|CloseStream)[ \t]*(?!\()(?<parameters>[\w \(\)\-,\.\/\[\]\*\t\+]+)?;?"
Local $sString = " " & @CRLF & _
" DrawRect barX-2 ,barY-2 ,barW+4 ,barH+4 ;" & @CRLF & _
" SetColor rgb[0]*colorMultipler,rgb[1]*colorMultipler,rgb[2]*colorMultipler;" & @CRLF & _
"public static TImage DelayTimer_in=BM" & @CRLF & _
"SetAlpha - float(n) / Fade1 //nn" & @CRLF & _
" DrawRect 0, 0,tApplication.ScrW(),tApplication.ScrH();" & @CRLF & _
"SetVirtualResolution(SourceScreenWidth, SourceScreenHeight);" & @CRLF & _
"SetColor 0, 0, 0" & @CRLF & _
"Delay 10; //mmm" & @CRLF & _
"Flip;" & @CRLF & _
"SetScale 10, 10;" & @CRLF & _
" CloseStream tLog.file; " & @CRLF & _
""
Local $sSubst = "$1$2\($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