Re:Your Wednesday, October 16, 2002 message

dont know about pulling the originating IP, you'll probably have to do
that manually, but you can pull all the route point IPs from from the
Received: lines a pseudo regex may look like:
 /(\s\w*\..*)\s*.*([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})/;
 $DNSname = \1;
 $IPaddr  = \2;

Been a while since I did any real regex so I was pulling this from memory

\1 would be the DNS name: preceded with a space (\s) alpha-numeric
word (\w*), atleast one dot required (\.) and remainder of address (.*) up
to one or more whitespaces (\s*)

\2 would be the IP: ignore any characters (.*) after the whitespace.
Some IPs have just the parenthesis others have parenthesis and square
bracket "([". Get the 4 octets of the IP: this is composed of a 1-3
digit {1,3} with any of the digits between 0 and 9 [0-9].

Thats about it for the quick & dirty. I'm sure the more experienced regex types
will expand this and fix my errors. But it'll give you a start point.

-- 
Cheers
Cricket

Take off all your clothes and walk down the street waving a machete
and firing an Uzi, and terrified citizens will phone the police and
report: `There`s a naked person outside!`


________________________________________________________
 Current version is 1.61 | "Using TBTECH" information:
http://www.silverstones.com/thebat/TBUDLInfo.html

Reply via email to