in reply to Re: Code in regexp
in thread Code in regexp

Does perl think that (??{ }) generates a zero-width assertion?

If that is the case, why should the + qualifier behave any differently to the {1,8} qualifier in pg's regex below?

It's surely a bug that one complains about matching empty string repeatedly, while the other seems to behave as non-zero width.

Jasper

Replies are listed 'Best First'.
Re: Re: Re: Code in regexp
by Jasper (Chaplain) on Dec 12, 2002 at 16:27 UTC
    Further to this (not that this thread isn't long dead), in Terje Kristensen's latest minigolf competition he came up with this:
    -n $;[map{/./,/[^$&-T]/g}/(?=(.*))/g].=$_}{print@
    Which does funny non zero width things for (?=)
    perl -le 'print for "foo bar"=~/(?=(.*))/g' foo bar oo bar o bar bar bar ar r
    I had no idea this would happen, anyway.

    Jasper