On Wed, 15 Oct 2003, Tracy wrote:

> I want to create a wildcarding pattern that will allow me to block items
> which contain an IP address. Now, I understand that the [ ] symbols are
> used for range matching, but do I need to specify one range to match each
> character I want to catch, or is there a better way?
>
> For example, assume I want to catch 116.68-136-217.adsl.skynet.be  (yes, I
> know that filtering on *.*.adsl.skynet.be would catch it - but it wouldn't
> catch 12-225-197-33.client.attbi.com - I want to catch anything that starts
> with a "recognizable" IP address). To accomplish this, do I need to write
> 81 patterns (648 when you consider the separator issue), or is there a
> faster, easier way? I'm thinking it's going to be:
>
> [0-9].[0-9].[0-9].[0-9].*
> [0-9].[0-9].[0-9].[0-9][0-9].*
> [0-9].[0-9].[0-9].[0-9][0-9][0-9].*
> [0-9].[0-9].[0-9][0-9].[0-9].*
> [0-9].[0-9].[0-9][0-9].[0-9][0-9].*
> [0-9].[0-9].[0-9][0-9].[0-9][0-9][0-9].*
> [0-9].[0-9].[0-9][0-9][0-9].[0-9].*
> [0-9].[0-9].[0-9][0-9][0-9].[0-9][0-9].*
> [0-9].[0-9].[0-9][0-9][0-9].[0-9][0-9][0-9].*
> etc., etc.
>
> But I want to be sure before I go to all the hassles...

You'd need a regex engine to do complex things.


- Davide

-
To unsubscribe from this list: send the line "unsubscribe xmail" in
the body of a message to [EMAIL PROTECTED]
For general help: send the line "help" in the body of a message to
[EMAIL PROTECTED]

Reply via email to