M
Max Adams
All,
I have this regular expression which a guy here provided yesterday, this
regexp parses an executable name from a log file, however it only works when
the executable name is part of a fully qualified name, and not when only the
executable name is specified. Here is my scenario:
The regexp will successfully parse "Stages.exe" for the first entry in the
log file, but it will not parse "Stages.exe" in the second entry.
..... [SERVER06:c:\workgroup\Stages.exe:2236: ....
..... [SERVER06:Stages.exe:2236 ....
This is the regular expression:
my @extract = ($_ =~ /.*\\([^\\]+\.exe).*SQL = ([^;]+).* [0-9]{8} ([0-9:
\/]+) .*/i);
This is a complete entry from the log file.
[SERVER05] EnumServerProceses : (0x31fdb30)
[SERVER06:c:\workgroup\Stages.exe:2588:{56DC057D-2D02-4A2A-A308-B625555C6345
}] CEnumServerProcesses::GenericExecute() : SQL = begin
PA_Stages.PR_GetProcessListTASKID); end; : CursonName = NULL : Options = 6
: SessionID = 12127793 11:59:29 27/08/2003 tid:1076 pid:2304
tick:16640900672768 .\EnumServerProcesses.cpp (55)
Note again that the executable path is not guarenteed to exist.
Can anyone suggest how I can modify this regexp to be independant of the
path being specified please.
PT
I have this regular expression which a guy here provided yesterday, this
regexp parses an executable name from a log file, however it only works when
the executable name is part of a fully qualified name, and not when only the
executable name is specified. Here is my scenario:
The regexp will successfully parse "Stages.exe" for the first entry in the
log file, but it will not parse "Stages.exe" in the second entry.
..... [SERVER06:c:\workgroup\Stages.exe:2236: ....
..... [SERVER06:Stages.exe:2236 ....
This is the regular expression:
my @extract = ($_ =~ /.*\\([^\\]+\.exe).*SQL = ([^;]+).* [0-9]{8} ([0-9:
\/]+) .*/i);
This is a complete entry from the log file.
[SERVER05] EnumServerProceses : (0x31fdb30)
[SERVER06:c:\workgroup\Stages.exe:2588:{56DC057D-2D02-4A2A-A308-B625555C6345
}] CEnumServerProcesses::GenericExecute() : SQL = begin
PA_Stages.PR_GetProcessListTASKID); end; : CursonName = NULL : Options = 6
: SessionID = 12127793 11:59:29 27/08/2003 tid:1076 pid:2304
tick:16640900672768 .\EnumServerProcesses.cpp (55)
Note again that the executable path is not guarenteed to exist.
Can anyone suggest how I can modify this regexp to be independant of the
path being specified please.
PT