From owner-freebsd-hackers Thu Jul 8 1: 1:18 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from apb.iafrica.com (apb.iafrica.com [196.31.1.20]) by hub.freebsd.org (Postfix) with ESMTP id 1D79A14C93 for ; Thu, 8 Jul 1999 01:01:10 -0700 (PDT) (envelope-from apb@iafrica.com) Received: from localhost (localhost [[UNIX: localhost]]) by apb.iafrica.com (8.8.8/8.8.8) with SMTP id KAA04344; Thu, 8 Jul 1999 10:00:52 +0200 (SAST) X-Authentication-Warning: apb.iafrica.com: apb owned process doing -bs Date: Thu, 8 Jul 1999 10:00:50 +0200 (SAST) From: Alan Barrett To: Jamie Howard Cc: freebsd-hackers@FreeBSD.ORG, tech-userlevel@netbsd.org, tech@openbsd.org Subject: Re: Replacement for grep(1) (part 2) In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 7 Jul 1999, Jamie Howard wrote: > The FreeBSD, NetBSD, and OpenBSD manpage for grep says this: > > Grep understands two different versions of regular expression > syntax: ``basic'' and ``extended.'' In GNU grep, there is > no difference in available functionality using either syntax. > > Is this inaccurate or am I reading it wrong? I think that you are reading it wrong. It means "If you have a task that can be performed in GNU grep using a regexp in one syntax, then the same task can also be performed in GNU grep using a regexp in the other syntax". It does not also mean "... and the regexps in the two syntaxes will be identical". For example, if your task is "find lines that contain the characters " then you can use the basic RE '(X)' or the extended RE '\(X\)'. You can get the same functionality using either syntax, but the way you get that functionality will depend on which syntax you are using. --apb (Alan Barrett) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message