develooper Front page | perl.perl5.porters | Postings from June 2012

Re: [perl #112894] Use of (?| ...) breaks \G or vice-versa

Thread Previous | Thread Next
June 18, 2012 10:54
Re: [perl #112894] Use of (?| ...) breaks \G or vice-versa
Message ID:
On 18 June 2012 19:53, yves orton via RT <> wrote:
> Hrm, this is an unfortunate side effect of how the implementation of
> C< (?|..) > and (?-1) work together.  The \G is actually irrelevant as
> without it the pattern matches at a different place and does not use (?
> -1) to match.
> I had hoped that named captures would solve this problem, but they suffer
> from the same thing. I will investigate further.

I also noticed a weird parse bug if you write the original pattern
with (?&1) which needs to be fixed as well.


perl -Mre=debug -e "/just|another|perl|hacker/"

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About