From owner-freebsd-questions Thu Jun 29 1:16:59 2000 Delivered-To: freebsd-questions@freebsd.org Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by hub.freebsd.org (Postfix) with ESMTP id 2758037BB2E for ; Thu, 29 Jun 2000 01:16:43 -0700 (PDT) (envelope-from ru@whale.sunbay.crimea.ua) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.9.3/1.13) id LAA14176; Thu, 29 Jun 2000 11:16:05 +0300 (EEST) Date: Thu, 29 Jun 2000 11:16:05 +0300 From: Ruslan Ermilov To: Dan Larsson Cc: questions@freebsd.org Subject: Re: egrep bug in FreeBSD-3.2S? Message-ID: <20000629111605.E10869@sunbay.com> Mail-Followup-To: Dan Larsson , questions@freebsd.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: ; from dl@tyfon.net on Thu, Jun 29, 2000 at 10:07:50AM +0200 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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