On Saturday 05 September 2009 21:33:23 Martín Ferrari wrote: > On Sun, Sep 6, 2009 at 00:24, Raphael Geissert<geiss...@debian.org> wrote: > > While checking something unrelated to the last patch I found that the > > following regex triggers an il: > > > > opts=uversionmangle=sx(.?)\Gxprint("foo")xg \ > > http://sf.net/kcheckgmail/kcheckgmail-(.+)\.tar\.gz > > Regarding this and what Adam's said before, from perlop man page: > > Note also that, currently, > "\G" is only properly supported when anchored at the very > beginning of the pattern. > > So, I don't think we need to support any of these two (broken) > examples as they rely on unspecified behaviour. The correct behaviour > > for \G *does* work, as you can see in the following snippet: > > Other than that and #545234, I have not been able to break it, for now.$ > > perl -MPET::Watch -e '$r = shift; $s = shift; > > PET::Watch::safe_replace(\$s, $r) or die; print "$s\n"' 's/o|\Gb/#/g' > > foobarbaz > > f###arbaz > > The \G makes the first b replaced but not the second. >
Sure, and like I said early on IRC, my patch doesn't support \G either; but also like I said, even if not supported we should not let uscan enter an il. > > What do you all think about the two patches? > > regarding my patch: fixing zero width matches should be easy, and that's > > the only known failure atm > > regarding Martín's-based patch: I'm not very keen on playing with pos(), > > and that was part of the reasons why I preferred to implement my fix the > > way I did it. > > Well, I'm obviously biased, but I really prefer the pos() version as > it mimics exactly what the regex engine does. And its bugs, as demonstrated above :) Cheers, -- Raphael Geissert - Debian Developer www.debian.org - get.debian.net -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org