in reply to Matching IP address continued
I've done my very best to replicate both your data and your regexs as you supplied them and all the regexes, including the one I gave you appear to match every line of data.
My results
C:\test>214537 136.1.1.154:33672 -> 64.210.209.51:80 -> 192.168.1.145:80 tcp Matched! Matched! Matched! Matched! Matched! Matched! Matched! 65.201.211.176:14664 -> 64.210.209.54:80 -> 192.168.1.78:80 tc +p Matched! Matched! Matched! Matched! Matched! Matched! Matched! 67.38.95.86:2116 -> 64.210.209.50:80 -> 192.168.1.103:80 tcp Matched! Matched! Matched! Matched! Matched! Matched! Matched! 198.49.222.246:52469 -> 64.210.209.54:80 -> 192.168.1.79:80 tc +p Matched! Matched! Matched! Matched! Matched! Matched! Matched! 193.80.106.152:3781 -> 64.210.209.61:80 -> 192.168.1.81:80 tcp Matched! Matched! Matched! Matched! Matched! Matched! Matched! 67.28.79.24:3248 -> 64.210.209.54:80 -> 192.168.1.79:80 tcp Matched! Matched! Matched! Matched! Matched! Matched! Matched! 128.187.192.39:1218 -> 64.210.209.54:80 -> 192.168.1.78:80 tcp Matched! Matched! Matched! Matched! Matched! Matched! Matched! 128.187.192.39:1209 -> 64.210.209.51:80 -> 192.168.1.144:80 tc +p Matched! Matched! Matched! Matched! Matched! Matched! Matched! sdasjdlk asd lkajslkdjalks8237472934 ajlksdjaser asdlkjaslkd No match! No match! No match! No match! No match! No match! No match!
Which leaves me at a loss to explain your findings?
My test script
#! perl -sw use strict; my $re_ip = qr/(\d+\.\d+\.\d+\.\d+):\d+/; my @re_lines = ( qr/ ^ \s* $re_ip \s* -> \s* $re_ip \s* -> \s* $re_ip /x, qr/^\s*$re_ip\s*->\s*$re_ip\s*->\s*$re_ip/, qr/^ \s* $re_ip\s*->\s*$re_ip\s*->\s*$re_ip/x, qr/^\s*$re_ip\s*-> \s* $re_ip\s*-> \s* $re_ip/x, qr/ ^ \s* $re_ip\s*->\s*$re_ip\s*->\s*$re_ip/x, qr/ ^ \s* $re_ip \s*->\s*$re_ip\s*->\s*$re_ip/x, qr/ ^ \s* $re_ip\s*->\s*$re_ip \s*->\s*$re_ip/x, ); while (my $line = <DATA>) { print $line; for my $regex (@re_lines){ $line =~ $regex ? print ' Matched!' : print ' No match!'; } print $/,$/; } __DATA__ 136.1.1.154:33672 -> 64.210.209.51:80 -> 192.168.1.145:80 tcp 65.201.211.176:14664 -> 64.210.209.54:80 -> 192.168.1.78:80 tc +p 67.38.95.86:2116 -> 64.210.209.50:80 -> 192.168.1.103:80 tcp 198.49.222.246:52469 -> 64.210.209.54:80 -> 192.168.1.79:80 tc +p 193.80.106.152:3781 -> 64.210.209.61:80 -> 192.168.1.81:80 tcp 67.28.79.24:3248 -> 64.210.209.54:80 -> 192.168.1.79:80 tcp 128.187.192.39:1218 -> 64.210.209.54:80 -> 192.168.1.78:80 tcp 128.187.192.39:1209 -> 64.210.209.51:80 -> 192.168.1.144:80 tc +p sdasjdlk asd lkajslkdjalks8237472934 ajlksdjaser asdlkjaslkd
Okay you lot, get your wings on the left, halos on the right. It's one size fits all, and "No!", you can't have a different color.
Pick up your cloud down the end and "Yes" if you get allocated a grey one they are a bit damp under foot, but someone has to get them.
Get used to the wings fast cos its an 8 hour day...unless the Govenor calls for a cyclone or hurricane, in which case 16 hour shifts are mandatory.
Just be grateful that you arrived just as the tornado season finished. Them buggers are real work.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Matching IP address continued
by ibanix (Hermit) on Nov 20, 2002 at 19:07 UTC | |
by BrowserUk (Patriarch) on Nov 20, 2002 at 19:32 UTC | |
by ibanix (Hermit) on Nov 20, 2002 at 23:00 UTC | |
by BrowserUk (Patriarch) on Nov 21, 2002 at 00:27 UTC |