From: jweirich@... Date: 2000-12-07T15:02:18+09:00 Subject: [ruby-talk:6880] Re: Equivalent to Perl's /g and pos()? >>>>> "Ben" == Ben Tilly 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? -- -- Jim Weirich jweirich@one.net http://w3.one.net/~jweirich --------------------------------------------------------------------- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)