//*&cls&echo off&cscript -nologo -e:jscript "%~f0"<"源文件.txt">"结果.txt"&pause & exit/b
var txt='';
while(!WScript.StdIn.AtEndOfStream){
var str = WScript.StdIn.ReadLine().replace(/^([^\-]+).*?(\-+[^\-]+)$/,'$1$2');
if (/^[^\-]+?\-+?[^\-]+?$/.test(str))txt+=str+'\r\n';
}
WSH.Echo(txt);
及时采纳回答