[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Sheflug] Regular Expressions for IP Address



On Tue, 2005-02-01 at 11:16 +0000, somecoolpc wrote:
> I am trying to write a regular expression to ban any ip address, so I
> can put that into my squidGuard ban lists.  But atm I can not get my
> head around how i would do it , without stoping any site that has four
> dots in its name e.g. web.mail.someisp.co.uk
> Any suggestions at all??

(?:[1,2]?[0-9]?[0-9]\.){3}(?:[1,2]?[0-9]?[0-9]\.)

... or something?

Cheers,

Alex.

___________________________________________________________________

Sheffield Linux User's Group -
http://www.sheflug.co.uk/mailfaq.html

  GNU the choice of a complete generation.