[pcre-dev] [Bug 1325] New quantifier combining 'possessive' …

Top Page
Delete this message
Author: Philip Hazel
Date:  
To: pcre-dev
Subject: [pcre-dev] [Bug 1325] New quantifier combining 'possessive' and 'lazy'
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1325




--- Comment #1 from Philip Hazel <ph10@???> 2012-12-18 09:24:58 ---
On Mon, 17 Dec 2012, Chris wrote:

> After '+' (possessive) and '?' (lazy), a union of the two: '*' (scrooge). It
> depends actually in combination with the next token, as a logical 'lazy
> possessive' makes no sense, it would result always in the least amount of
> characters.


This would be non-Perl compatible. There are precedents for PCRE having
such features, but I can't say that I am very keen on the idea,
especially as it isn't too much hassle to write the equivalent.

> Notation and meaning/alias:
> a?*b            (?>a??b)
> a**b            (?>a*?b)
> a+*b            (?>a+?b)
> a{n,m}*b        (?>a{n,m}?b)
> a{n,}*b         (?>a{n,}?b)


Another reason for being cautious is that this is a new paradigm ...
depending on the following item as it does, so that a?* on it own is not
meaningful.

Philip


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email