Discussion: grep: BRE with caret
Afficher un message
Vieux 21/08/2006, 16h22   #2
Bill Marcum
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: grep: BRE with caret

On Mon, 21 Aug 2006 17:00:09 +0200, Daniel Mentz
<usenet@fire-of-desire.de> wrote:
> I have some problems with grep and BRE (Basic Regular Expressions).
> According to my documentation, a caret which is not the first character in
> a BRE matches a literal caret.
>
> The following command should find all lines containing "xx^x":
> grep "xx^x"
>
> But it doesn't match lines containing "xx^x".
>
> Whereas
> grep ".x^x"
> works fine. It matches "xx^x"
>
> Could somebody explain to me why the first command isn't working as
> expected.
> I'm using grep (GNU grep) 2.5.1
>

It looks to me like you have discovered a bug. xx\^x will also work.


--
We have nowhere else to go... this is all we have.
-- Margaret Mead
  Réponse avec citation
 
Page generated in 0,04515 seconds with 9 queries