Subject: Re: Replacement for grep(1) (part 2)
To: Jamie Howard <>
From: Alan Barrett <>
List: tech-userlevel
Date: 07/08/1999 10:00:50
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)