Auteur: ph10 Date: À: Ze'ev Atlas CC: pcre-dev@exim.org, 1437@bugs.exim.org Sujet: Re: [pcre-dev] [Bug 1437] Using PCRE-8.34 on x86-64 Linux with
--enable-jit and --enable-utf ,
grep -iP '^S' gets stuck on a binary file consuming a lot of CPU formany
seconds
On Fri, 24 Jan 2014, Ze'ev Atlas wrote:
> Why is that so hard to enforce '^' to start where it supposed to be
> (i.e. in the absolute start of the supplied string)?
I think you misunderstand '^'.
1. It need not be at the start of the regex: /abc|^xyz/ for example
(this is a perfectly reasonable pattern you might give to grep for "find
a line containing 'abc' or beginning with 'xyz'".)
2. It does not always match at the start of the subject string: in
multiline mode it can match after a newline in the middle of a string.