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

Ben Golding bengolding at fastmail.fm
Mon Feb 16 16:33:00 UTC 2009


Hi all,

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.

Regards
Ben Golding




More information about the regex-coach mailing list