[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: grep -e '\(a\)\1' -e '\(b\)\1'
From: |
Tapani Tarvainen |
Subject: |
Re: grep -e '\(a\)\1' -e '\(b\)\1' |
Date: |
16 Feb 2001 20:25:15 +0200 |
"Alain Magloire" <address@hidden> writes:
> > multiple -e arguments
> > should be treated as independent patterns and back references
> > should not refer to previous ones.
> I think we can agreed that current behaviour of GNU grep for BRE
> should be fix.
I must say I'm once again impressed!
No way could I expect that rapid response from any
commercial vendor.
> > echo ba | egrep '(a)\1|(b)\1'
> >
> > doesn't print ba either.
>
> If you are sticking with POSIX.2, For ERE the expression is not
> portable
Agreed. I just find the behaviour in that case surprising:
I'd expect it to match either both aa and ba, or a1 and b1.
Apparently that only matches aa.
--
Tapani Tarvainen