On Tue, Nov 08, 2005 at 10:55:05AM -0500, Matt Fowles wrote: : Patrick~ : : On 11/8/05, Patrick R. Michaud <[EMAIL PROTECTED]> wrote: : > On Tue, Nov 08, 2005 at 12:57:18PM +0000, [EMAIL PROTECTED] wrote: : > > "Patrick R. Michaud" <[EMAIL PROTECTED]> wrote: : > > :And we also get \d:0123 as a cheap way of saying \d<?null>0123. : > > : > > I think the ':' changes the meaning of the rule, so you still need : > > '\d<?null>0123' (or preferably something shorter) for the uncut semantic. : > : > Not really; the ':' (as 'cut') simply means to not retry the : > preceding atom, and in this case since the previous atom has : > no backtracking associated with it already (a '\d' matches a single : > digit or fails), so the ':' is effectively a no-op. In fact, : > in PGE '\d' and '\d:' generate exactly the same code. : : While that is true for the rule /\d:0123/ it is not for /.*\d:0123/, : as preceding backtracking options may need to be explored. If I : understand this correctly....
Nope, the .* is not included in the "previous atom". It's scoped the same as *, in other words. Larry