This won't capture exactly what you want, since it wont accept 5 or 6 zero's. You'll need to add \d{5}\d? as a disjunct (i.e. \d\d\d[1-9]|\d\d[1-9]\d|\d[1-9]\d\d|[1-9]\d\d\d|\d{5}\d?)
I don't know if your trying to match a substring or if you want to have the whole string be only four to six digits excluding the case '0000', if you only want the digits then you'll need to add the begin string '^' and end string '$' but don't forget to put parens around all the disjuncts. Hope that helps, Eitan ---------------------------------------------------------------------------- Eitan Katznelson ([EMAIL PROTECTED]) Quimbik (http://www.quimbik.com) -----Original Message----- From: Bryan Field-Elliot [mailto:[EMAIL PROTECTED]] Sent: Monday, February 04, 2002 12:41 PM To: [EMAIL PROTECTED] Cc: Regexp Users List Subject: Re: Pls help: Match digits except "0000" YES! That's it, thank you very much! Bryan On Mon, 2002-02-04 at 07:14, Fergus Gallagher wrote: > \d\d\d[1-9]|\d\d[1-9]\d|\d[1-9]\d\d|[1-9]\d\d\d > > F > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>