procmail
[Top] [All Lists]

Re: IP regex

2009-02-19 21:57:59
On Thu, 19 Feb 2009, Professional Software Engineering wrote:

At 21:28 2009-02-19 -0500, Fleet Teachout wrote:
For example (made up) the range of IPs is:
The following should work to specify a 0-255 value, allowing for optional leading zeroes on values which might otherwise be represented in single or double digits:

       ([0-1]?[0-9]?[0-9]|2([0-4][0-9]|5[0-5]))

Thank you.

And is they *any* way to test a regex in actual procmail format? Grep/egrep differ enough that I'm never sure I've got it right.

Sandbox it and throw a known range of values at it.

Ok. I have had a sandbox for years; but I only know how to use 'formail -s procmail ~/sandbox/test.rc < ~/Mail/backups/backup' I can change the input of course; but this presumes a mail format. If I create a data file of IP ranges, can I use procmail directly to look at that data file?

                                - fleet -

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>