I'm interested in using RegExp for Batch. I put this script together:
@if (@X)==(@Y) @end /* @goto :Batch setlocal disableDelayedExpansion set "infile=" set "test=%~1" if defined test ( setlocal enableDelayedExpansion if "!test:~0,1!" neq "/" ( endlocal set ^"infile=^<"%~1"" shift /1 ) else endlocal ) %infile% %outfile% cscript //E:JScript //nologo "%~f0" "%/d%" exit /b 0 var array=new Array(), delim =WScript.Arguments.Item.replace(/(a)/gmi,'b'),
The above consists of batch script that makes it applicable to stdin a local text file data in cmd and runs a RegExp related JS replace function and argument with a respective stdout. I tested it with a regular -o switch, but did not see results. What should I do?