#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?i)(?m)^\s*//.*(?:\r?\n)?"
Local $sString = " case kRESULT_STATUS_SHORTAGE: " & @CRLF & _
" _stprintf(outDevStr, _T("2000 - (Shortage issue) - %s(Shortage)"), errorStr);" & @CRLF & _
" outError = HOP_SHORTAGE;" & @CRLF & _
" outSeverity = CCC_INFORMATION;" & @CRLF & _
" break;" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"// New Error codes(really..." & @CRLF & _
" //case kRESULT_STATUS_..." & @CRLF & _
" // _stprintf( outDevStr, _T("2900 - (Cover Open) -..." & @CRLF & _
" // outError = HOP_COVER_OPEN;" & @CRLF & _
" // outSeverity = CCC_INFORMATION;" & @CRLF & _
" // break;" & @CRLF & _
""
Local $sSubst = ""
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