jweirich / one.net wrote: > > >>>>> "Ben" == Ben Tilly <ben_tilly / hotmail.com> writes: > > >> The "slow" method is O(n*n) as expected. Both the "strscan" and >the > >> "scan" methods are O(n). > > Ben> Both of the scan methods are incompatible with > Ben> context-sensitive tokenizing. Guess what I want to do? :-) > >And StringScanner is incompatible because ... it only matches from the >front of the string? /me reads.. /me goes "d'oh"! /me realizes that lack of sleep is a problem for him... The scan method there is right. I hadn't realized that $' and $` were populated by default on every match using index. Of course in Perl I never use those because of the performance hit. But I guess that Ruby has no obvious way around them. Perhaps when I have more than a couple of days with Ruby I will have a better sense. (Or perhaps after I get some sleep.) Thanks, Ben _____________________________________________________________________________________ Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com