On Nov 1, Michael Gargiullo said:
I'm in the process of writing a rather complex parser script to parse
nessus output, can be anything from:
results|192.168.1|192.168.1.131|https (443/tcp)|10330|Security Note|A
web server is running on this port through SSL\n
to
results|192.168.1|192.168.1.13
Hi all,
I'm in the process of writing a rather complex parser script to parse
nessus output, can be anything from:
results|192.168.1|192.168.1.131|https (443/tcp)|10330|Security Note|A
web server is running on this port through SSL\n
to
results|192.168.1|192.168.1.131|https (443/tcp)|10863|Secu
Try:
/\[GUARD\] ([^<>]+)<(\d+)><(\d+)><([^<>]+)> ([^<>]+) <({^<>]+)>/
To limit the characters you were matching with '.' to anything but angle brackets or:
/\[GUARD\] (.+?)<(\d+?)><(\d+?)><(.+?)> (.+?) <(.+?)>/
To cause the matching to be non-greedy and not swallow up the ">
onald" <[EMAIL PROTECTED]>
To: "Beginners (E-mail)" <[EMAIL PROTECTED]>
Sent: Friday, January 18, 2002 1:39 PM
Subject: regex issues
> Folks,
>
> I have the following log line
>
> [GUARD] ux234<870><1764517><13.231.232.72> IMP
>
>
Folks,
I have the following log line
[GUARD] ux234<870><1764517><13.231.232.72> IMP
here is the regex I am attempting to use
# $1 $2$3 $4$5
$6
elsif ( $line =~ /\[GUARD\] (.+)<(\d+)><(\d+)><(.+)> (.+) <(.+)>/)