> Again, it would be nice to be able to flag these to the compiler in a > rule: > rule thrice :count { <={.count < 4}> } > / a<thrice>? / > Note that the C<?> would cause the thrice count-rule to be matched > non-greedily because the regex parser knows that it's a count, not a > generic rule.
Going off on a tangent here, is there some deep and meaningful reason why we're still using C<?> as a non-greedy multiplier suffix? I only ask because one of the biggest sticking points with C<?> in my Perl students is that it means two pretty completely different things, depending on whether a multiplier comes before it or not. A5 solved the dual-meaning of C<^> nicely, by dumping the syntax for character classes. If we're redefining the regex grammar so that different things don't look too similar (one of Larry's philiophical points in A5), isn't the dual meaning of C<?> another one that ought to be dealt with? It's not like the non-greedy suffix is something that is deeply ingrained in (non-Perl) regex culture. I'm not suggesting syntax for a revised non-greediness operator. It'd probably include a colon and thus disqualify itself according to Larry's Law of Language Design. But it'd have to reflect good Huffman coding. (Besides, this'd nicely help solve one aspect of what Aaron's bringing up in the quoted message above.) -- Debbie Pickett http://www.csse.monash.edu.au/~debbiep [EMAIL PROTECTED] "We just ride with the wind, and we'll drive through the rain. We don't know where we'll get to, or if we'll get back again." - _Blown by the Wind_, Alan Parsons