Rush
Уже за тридцать... | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору if wscript.arguments.count = 3 then fname = wscript.arguments.item(1) fname2 = wscript.arguments.item(2) mask = wscript.arguments.item(0) set fso = createobject("scripting.filesystemobject") set rexp = createobject("vbscript.regexp") set txtfile = fso.opentextfile(fname):txt = txtfile.readall:txtfile.close arg = split(mask, "==") rexp.pattern = arg(0):rexp.global = true:rexp.multiline = true txt = rexp.replace(txt, arg(1)) set txtfile = fso.opentextfile(fname2, 2, true):txtfile.write txt:txtfile.close end if wscript.quit '' запуск из командной строки - wscript.exe "replacerexp.vbs" "^.{10}==" "in.txt" "out.txt" //b | Всего записей: 3551 | Зарегистр. 20-11-2003 | Отправлено: 13:35 12-04-2008 | Исправлено: Rush, 13:39 12-04-2008 |
|