I see the accepted text still hasn't changed, what's the consideration? > 2025年3月14日 09:14,Niu Danny via austin-group-l at The Open Group > <[email protected]> 写道: > > Looks good to me. I hope we can add this to > Bug 1857's accepted texts' informative part. > > Thank you very much, Geoff and everyone! > >> 2025年3月13日 20:39,Geoff Clare via austin-group-l at The Open Group >> <[email protected]> 写道: >> >> Niu Danny wrote, on 12 Mar 2025: >>> >>>> I was thinking about something like this: >>>> >>>> The precedence of quantifiers are as follow (from highest to lowest): >>>> >>>> 1. The length of any minimal quantifier -modified subexpression >>>> shall be such that they match the shortest substring of the >>>> subject string, in descending priority from left to right. >>>> >>>> 2. Consistent with rule 1, the length of the overall match shall >>>> be the longest possible. >>>> >>>> 3. The length of any greedy quantifier -modified subexpression >>>> shall be such that they match the longest substring of the >>>> subject string, in descending priority from left to right. >> >> That seems like a sound idea for some clarifying text, but it does not >> use the right terminology, it needs to apply to all repetitions not >> just those for subexpressions, and it needs an addition to make the >> pathological cases unspecified. >> >> Here's my attempt: >> >> If an ERE contains repetitions with and without the repetition >> modifier '?', the precedence between the repetitions shall be: >> >> 1. Each leftmost shortest match shall match the leftmost shortest >> sequence in the string, in descending priority from left to right. >> >> 2. Consistent with rule 1, the length matched by the entire regular >> expression shall be the leftmost longest. >> >> 3. Consistent with rules 1 and 2, each leftmost longest match shall >> match the leftmost longest sequence in the string, in descending >> priority from left to right. >> >> 4. If an attempt is made to match the same sequence of the string >> using repetitions both with and without the repetition modifier '?', >> the behavior is unspecified. For example, the ERE ([0-9]+)+? has >> unspecified behavior. >> >> -- >> Geoff Clare <[email protected]> >> The Open Group, Apex Plaza, Forbury Road, Reading, RG1 1AX, England >> > >
Re: I still find the resolution Bug1857 not satisfactory. (topic: regex)
Niu Danny via austin-group-l at The Open Group Thu, 20 Mar 2025 01:23:43 -0700
- Re: I still find the... Niu Danny via austin-group-l at The Open Group
- Re: I still fin... Geoff Clare via austin-group-l at The Open Group
- Re: I still... Niu Danny via austin-group-l at The Open Group
- Re: I still find the... Geoff Clare via austin-group-l at The Open Group
- Re: I still fin... Niu Danny via austin-group-l at The Open Group
- Re: I still... Geoff Clare via austin-group-l at The Open Group
- Re: I s... Niu Danny via austin-group-l at The Open Group
