var stream = fso.OpenTextFile(args(0), 1, false, -2); var text = stream.ReadAll(); stream.Close();
var lines = text.split(/\r\n/);
for(var i = 0; i < lines.length; i++){ var position = lines[i].indexOf(args(1)); if (position != -1 && i != 0) WScript.Echo(lines[i-1]); } ↑↑↑↑↑↑↑↑ここまで