- //&cls&cscript -nologo -e:jscript "%~f0"<"文本.txt"&pause&exit
- var cnstr = '·:﹖?。,;﹔!、‘’“”﹫‖()﹛﹜〈〉﹝﹞「」『』《》︵︶︷︸︿﹀︹︺︽︾﹁﹂﹃﹄︻︼〖〗【】ˊ'ˋ∕﹨|∥∫∮∈∩∪⌒∧∨⊙√∠⊥∝∞%﹪‰°℃℉¢〒£∑﹟﹠﹡﹩¥﹏﹋﹌﹊‐ˉ_―—∴∵∷﹤﹢+±÷×﹦=≈≠≤≥≮≯∈≌∽≡※';
- var reg = new RegExp(cnstr.split('').join('|'), 'g');
- var s='', n=1;
- while(!WSH.StdIn.AtEndOfStream){
- var line = WSH.StdIn.ReadLine();
- if(reg.test(line))s += '第'+n+'行 '+line.replace(reg, ' {$&} ')+'\r\n';
- n++;
- }
- WSH.echo(s);
复制代码
|