本帖最后由 Five66 于 2023-9-7 06:30 编辑
- @set @theCopyLeft=0;/* 0& echo off
-
- set "inflie=aaa.txt"
- set "outfile=bbb.txt"
- set "add=:GTIOU(数字,0,0);"
-
- type "%inflie%" | cscript //nologo //e:jscript "%~f0" "%add%" >"%outfile%"
- echo done&pause&exit/b
- rem */
-
- var a,b=WScript.Arguments.Length?WScript.Arguments(0):":GTIOU(数字,0,0);";
- while (!WScript.StdIn.AtEndOfStream) {
- f = WScript.StdIn.ReadLine();
- if(!f){WScript.Echo(f);continue;}
- a=f.replace(/^(\d)+[.-]+/,'');
- if(f.substr(0,4)=="----")WScript.Echo('{'+f+'}');
- else if(RegExp.$1 && RegExp.$1 !='nil' && a)WScript.Echo(a+b.replace("数字",RegExp.$1));
- else WScript.Echo(f);
- "nil".replace(/(nil)/,"");
- }
复制代码
|