On Fri Sep 23 02:15:05 2011, ph10@hermes.cam.ac.uk wrote: > On Wed, 21 Sep 2011, Father Chrysostomos via RT wrote: > > > Come to think of it, we already have your version of (*THEN), as > > (?>...). I know I’m just repeating what you said by that. But it has > > just occurred to me that it belongs at the top of this list. > > > > So your ^A(B(*THEN)C) translates into ^A((?>B)C). > > Sure ... but Perl has never shied away from having "more than one way to > do it" has it? :-) > > You will be please to hear that Jeff Friedl, who has only just > discovered (*THEN) and friends - I guess he's been doing other stuff - > agrees with your and Perl's interpretation. He even pointed out that > adding a non-matching alternation would change the behaviour. I haven't > had any responses from the mailing list I asked. So on a sample of one > third party, it looks like my intuition is invalid. I wouldn’t say it’s invalid, as Perl’s documentation is a little unclear. I hope I have clarified that with commit ac9d848. > > At a practical level, I am not sure it is feasible to change PCRE to > behave like Perl, so I may have to settle for documenting the > difference. There are precedents (i.e. other differences). > > Thanks for picking this up and having this discussion. > > Regards, > PhilipThread Previous | Thread Next