[Tutor] pattern searching

bob gailer bgailer at gmail.com
Mon Nov 9 04:13:43 CET 2009


Lie Ryan wrote:
> Ajith Gopinath wrote:
>> Thanks folks.
>>
>> || a j i t ||
>>
>>
>> On Sat, Nov 7, 2009 at 7:49 AM, bob gailer <bgailer at gmail..com 
>> <mailto:bgailer at gmail.com>> wrote:
>>
>>     Shashwat Anand wrote:
>>
>>         @Bob: the solution seems promising, and it's fast. Thanks for
>>         the improvement. However I would like to do a minor change to
>>         the code to prevent it going to infinite loop.
>>
>
> Be mindful that if the original string contains 'lul' you might miscount.

I disagree. My algorithm works on a translation of the original. 'lul' 
will be translated to 'lll'.



-- 
Bob Gailer
Chapel Hill NC
919-636-4239


More information about the Tutor mailing list