in reply to Re: Tracking consecutive characters
in thread Tracking consecutive characters

The naive way is, of course, !!+

It may be the naive way, but sometimes that's the best way (and why not in this case)

Replies are listed 'Best First'.
Re^3: Tracking consecutive characters
by Aristotle (Chancellor) on Sep 27, 2004 at 13:34 UTC

    I didn't say it wasn't. :-) In fact, with most regex engines, the star quantifier is optimized better than the plus quantifier which in turn is often optimized better than the curlies quantifier, so it may even be better to use !!!* here if performance is what you need. (Caveat benchmark etc.)

    Makeshifts last the longest.