Looking for a regular expression

Ray Strode halfline at hawaii.rr.com
Tue Jul 24 00:36:26 PDT 2001


> Looking for a regular expression> I'm looking for a regular expression that will fetch IP
addresses
> from a file such as
> > /var/log/messages etc. So far, I have a start, it looks like this:
> something like
> $ cat /var/log/messages | sed -n -e "s/^.*IP //g" -n -e "s/ on.*//p"
Actually that won't really work to often...
I wasn't thinking straight.  I just opened it up and looked for an ip address and the words aroudn
it.

:-)
--Ray Strode



More information about the LUAU mailing list