Regular expression question...


Subject: Regular expression question...
From: David J. Weller-Fahy (dave-lists-aklug@weller-fahy.com)
Date: Fri Aug 15 2003 - 22:22:03 AKDT


I'm attempting to remove all the entries that iptables have put into my
'messages' firewall log that do not contain my external IP address as
the destination address.

Here is the best regular expression that I've been able to come up with
so far:

^.*IN=eth1.*DST=[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[^2][^3][^2].*$

As I understand REs (that is: not very well) this should match:

BOL(anything)IN=eth1(anything)xxx.xxx.xxx.(anything but 232)(anything)EOL

In the previous pattern, everything that is not anything should match
the first occurence, not the last. Now, I know I'm incorrect, because
it's not working when I try it in an s/// pattern in vim.

Can anyone give a suggestion that would work better, or point out the
error of my RE?

Regards,

-- 
David J. Weller-Fahy        | 'These are the questions that kept me out
largely at innocent dot com |  of the really *good* schools.'
www dot weller-fahy dot com |                  - One of The Group
---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.



This archive was generated by hypermail 2a23 : Fri Aug 15 2003 - 22:22:06 AKDT