bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: egrep 2.4 problem with '^^' pattern?


From: tt
Subject: Re: egrep 2.4 problem with '^^' pattern?
Date: 11 Apr 2001 17:02:53 +0300

address@hidden (Don Buchholz) writes:

> Using the regexp '^^U* ' [0x5E 0x5E 0x2A 0x55 0x0A 0x20], "grep" matches
> all the correct lines, but "egrep" matches none.  However, "egrep ^^" 
> matches *all* lines!

'^^' is not valid extended regexp.
In basic regexps (as in grep), ^ matches itself if it isn't in
the beginning of line, but in extended regexps (as in egrep)
it must always be protected if you want it to mean itself.

So, use egrep '^\^' and see if it works better.

-- 
Tapani Tarvainen



reply via email to

[Prev in Thread] Current Thread [Next in Thread]