Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Jul 1999 10:00:50 +0200 (SAST)
From:      Alan Barrett <apb@iafrica.com>
To:        Jamie Howard <howardjp@wam.umd.edu>
Cc:        freebsd-hackers@FreeBSD.ORG, tech-userlevel@netbsd.org, tech@openbsd.org
Subject:   Re: Replacement for grep(1) (part 2)
Message-ID:  <Pine.NEB.3.95.990708094726.336C-100000@apb.iafrica.com>
In-Reply-To: <Pine.GSO.4.10.9907071528400.9934-100000@rac10.wam.umd.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
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
<open-parentheses><X><close-parentheses>" 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.95.990708094726.336C-100000>