Date: Thu, 29 Jun 2000 11:16:05 +0300 From: Ruslan Ermilov <ru@sunbay.com> To: Dan Larsson <dl@tyfon.net> Cc: questions@freebsd.org Subject: Re: egrep bug in FreeBSD-3.2S? Message-ID: <20000629111605.E10869@sunbay.com> In-Reply-To: <NEBBJANJCNNAKCPFKHHFOEOACHAA.dl@tyfon.net>; from dl@tyfon.net on Thu, Jun 29, 2000 at 10:07:50AM %2B0200 References: <NEBBJANJCNNAKCPFKHHFOEOACHAA.dl@tyfon.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jun 29, 2000 at 10:07:50AM +0200, Dan Larsson wrote: > -> Why doesn't the following work: > > echo 100.200.300.400 | egrep -e '^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$' > > (I've also tried the regexp escaping the repetition operators with the same result) > > -> when this does: > > echo 100.200.300.400 | egrep -e '^[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*$' > > Is it a bug in egrep? The regexp works on FreeBSD-4.0S! > Because (as per manpage) "egrep is similar (but not identical) to grep -E". Add -E flag. Recent versions of GNU grep treat `egrep as grep -E'. Cheers, -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000629111605.E10869>