- //&cls&dir /b *.txt|cscript -nologo -e:jscript "%~f0"&pause&exit
-
- function reStr(file){
- var f = fso.opentextfile(file, 1);
- str = f.ReadAll()
- .replace(/\r\n[ ]*/g, '\r\n ') //行首两个空白
- .replace(/^[ ]*\r\n/gm, '') //删除空白行
- .replace(/加入书签.+下载错误举报[\r\n]+\s+/g, ' ') //部分无关内容
- .replace(/^[ ]*/,"") //第X章前面删除
-
- //删除加更
- .replace(/[\((][^)\)]{0,9}第?[一二两三四五六七八九十○零百千0-91234567890]*更[^)\)]{0,9}[\))]/g, '')
-
- //删除5行内PS:内容
- .replace(/^[ ]*PS[::](.+\r?\n){1,5}(\r?\n)?$/gm, '\r\n')
- .replace(/^[ ]*PS[::](.+\r?\n){1,5}(\r?\n)*([\s\t ]*第[一二两三四五六七八九十○零百千0-90-9]{1,12}[章].*\r?\n)/gm, '\r\n\r\n$2$3')
-
- //(各种非指定字符串草替换肏,需要将下一行//.replace前面的//删除)
- //.replace(/“([^墙头断肠割茅喂香杂小嫩青绿百牧狂本药甘干枯水花虫潦烟柴灯粮做])草([!。,?])/g, '“$1肏$2')
-
- //各种非指定字符串操替换肏
- .replace(/“([^早体贞风节情收练内棒洁做])操([!,?。])/g, '“$1肏$2')
-
- .replace(/我[操草]你/g, '我肏你')
- .replace(/[操草]你妈/g, '肏你妈')
- .replace(/牛[bB逼]/g, '牛屄')
- .replace(/装[bB逼]/g, '装屄')
- .replace(/傻[bB逼]/g, '傻屄')
- .replace(/([你我他她])妈[bB逼]/g, '$1妈屄')
- .replace(/特么的/g, '他妈的')
-
- .replace(/\*\*裸/g,"赤裸裸")
- .replace(/([男女兽猎夫妇那])\*+([叫喊哭])/g,"$1人大$2")
- .replace(/([海灵])\*+([易涉])/g,"$1**$2")
-
- .replace(/\*+不离十/g,"八九不离十")
- .replace(/十有\*?\*/g,"十有八九")
- .replace(/天\*+美/g,"天性爱美")
- .replace(/高\*+力/g,"高**力")
- .replace(/洞\*+出/g,"洞内射出")
- .replace(/洞\*+部/g,"洞穴内部")
- .replace(/向\*+围/g,"向中心围")
- .replace(/表\*+彩/g,"表**彩")
- .replace(/消\*+影/g,"消失身影")
- .replace(/开\*+流/g,"开**流")
- .replace(/水\*+融/g,"水乳交融")
- .replace(/一\*+日/g,"一**日")
- .replace(/有\*?\*份/g,"有失身份")
- .replace(/\*?\*凡胎/g,"肉体凡胎")
- .replace(/滔天\*?\*/g,"滔天大波")
-
- .replace(/纸张谈兵/g,"纸上谈兵")
- .replace(/前车之签/g,"前车之鉴")
- .replace(/之间其中/g,"只见其中")
- .replace(/事有余辜/g,"死有余辜")
- .replace(/嘎然而止/g,"戛然而止")
- .replace(/千刀万剐一把/g,"千刀万剐一般")
- .replace(/([白瞅瞧看]了[^ ,。、“”:;!?…]*一)样/g,"$1眼")
-
-
- //尾行两个空格
- .replace(/^([\S\s]*)(\r\n)$/gm, '$1$2$2');
-
- f.Close();
- var f = fso.opentextfile(file, 2);
- f.Write(str);
- }
- var fso = new ActiveXObject('Scripting.FileSystemObject');
- while(!WScript.StdIn.AtEndOfStream)reStr(WScript.StdIn.ReadLine());
复制代码 我常用这样的,因几十KB,所以删减了 |