[regex-coach] Feature req: possessive quantifier support (revisited)

Edi Weitz edi at agharta.de
Mon Feb 16 18:32:52 UTC 2009


On Mon, Feb 16, 2009 at 5:33 PM, Ben Golding <bengolding at fastmail.fm> wrote:

> I already checked the archives for this issue and it seems I am not the
> first to ask:
> http://common-lisp.net/pipermail/regex-coach/2005-April/000282.html
>
> The response from Edi at that time:
>    "Standalone" regular expressions ("atomic grouping") as in (?>x+)
>    are
>    supported, possesive quantifiers as in x++ aren't because they
>    aren't
>    in Perl and CL-PPCRE tries to be compatible with Perl.
>
> That was in 2005. Indeed, using an older Perl:
>    % perl -e "print 'no' if '123456' !~ /\d++6/"
>    Nested quantifiers in regex; marked by <-- HERE in m/\d++ <-- HERE
>    6/ at -e line 1.
>    % perl -v
>    This is perl, v5.8.3 built for sun4-solaris
>    ...
>
> However, now Perl has changed:
>    >perl -le "print 'no' if '123456' !~ /\d++6/"
>    no
>    >perl -v
>    This is perl, v5.10.0 built for MSWin32-x86-multi-thread
>    ...
>
> Could be a limitation of CL-PPCRE or could be that the Regex Coach only
> needs updated, I'm not sure on this.

There's currently no support for this in CL-PPCRE and I have no
immediate plans to follow Perl's lead closely unless someone funds the
work.

Sorry,
Edi.




More information about the regex-coach mailing list