Hi,
I need to add two RegExp statements for exclusions to the output file.
Problem is I get two file patterns that always differ and want the report not to generate those diffs. The two patters are 'server[0-9]{4,5}.xml.*' and 'tmp.*'.
How can I get the RegExp syntax in ExamDiff to do this? I can run 1 or the other but not both in the same syntax.
WScript statement I use is:
" \"c:\\Program Files\\ExamDiff Pro\\ExamDiff.exe\" " + sFile1 + " " + sFile2 + " /j:(server[0-9]{4,5}) /o:" + sOutputFile + " /no";
Multiple REGEXP syntax
Are you trying to exclude files matching certain patterns? If so, you should use "fx" option, which should also allow you to specify multiple comma-separated patterns.
If you are trying to exclude certain lines that match regular expressions, use "j" option with vertical bar character ("|") to denote OR relationship between individual regular expressions.
If you are trying to exclude certain lines that match regular expressions, use "j" option with vertical bar character ("|") to denote OR relationship between individual regular expressions.
psguru
PrestoSoft
PrestoSoft
-
- New Member
- Posts: 7
- Joined: Wed Feb 08, 2006 7:08 am
-
- New Member
- Posts: 7
- Joined: Wed Feb 08, 2006 7:08 am
Maybe not... I removed the /no to not output a file, altered the /j parameter, and changed the code as follows:
sExamDiff = " \"c:\\Program Files\\ExamDiff Pro\\ExamDiff.exe\" " + sFile1 + " " + sFile2 + " /j:tmp.*|server[0-9]{4,5}.* /o:" + sOutputFile;
sCmd = "cmd /c ";
oRunningProcess = WshShell.Exec(sCmd + sExamDiff);
while (oRunningProcess.Status == 0)
{
Application.Sleep(1);
}
If I run them now the command window just "flashes", and no output file. I even altered the 2nd expresssion to "fail" (ie. 'blah[0-9]{4,5}') and no output is generated.
Help!??
sExamDiff = " \"c:\\Program Files\\ExamDiff Pro\\ExamDiff.exe\" " + sFile1 + " " + sFile2 + " /j:tmp.*|server[0-9]{4,5}.* /o:" + sOutputFile;
sCmd = "cmd /c ";
oRunningProcess = WshShell.Exec(sCmd + sExamDiff);
while (oRunningProcess.Status == 0)
{
Application.Sleep(1);
}
If I run them now the command window just "flashes", and no output file. I even altered the 2nd expresssion to "fail" (ie. 'blah[0-9]{4,5}') and no output is generated.
Help!??
-
- New Member
- Posts: 7
- Joined: Wed Feb 08, 2006 7:08 am
-
- New Member
- Posts: 7
- Joined: Wed Feb 08, 2006 7:08 am
The problem is the way the command was built. The syntax should be as follows (JScript) and it works. I hope this will help someone... :>)
sExamDiff = "\"c:\\program files\\examdiff pro\\examdiff.exe\"";
oRunningProcess = WshShell.Exec(sExamDiff + " " + sFile1 + " "+sFile2 + " /j:tmp.*|server[0-9]{4,5}.* "+ " /o:" + sOutputFile+" /no");;
while (oRunningProcess.Status == 0)
{
//Sleep for 1 second....
}
if (objFSO.FileExists(sOutputFile))
{
//Do something if there is a file output...
}
else
{
//Do something if no file output...
}
sExamDiff = "\"c:\\program files\\examdiff pro\\examdiff.exe\"";
oRunningProcess = WshShell.Exec(sExamDiff + " " + sFile1 + " "+sFile2 + " /j:tmp.*|server[0-9]{4,5}.* "+ " /o:" + sOutputFile+" /no");;
while (oRunningProcess.Status == 0)
{
//Sleep for 1 second....
}
if (objFSO.FileExists(sOutputFile))
{
//Do something if there is a file output...
}
else
{
//Do something if no file output...
}