Another short blog post/tutorial (Finding a string in a stream)

Regan Heath regan at netwin.co.nz
Wed Mar 15 18:22:14 PST 2006


On Thu, 16 Mar 2006 09:58:55 +0800, Alan Knowles <alan at akbkhome.com> wrote:
> You missed the challenge of the task :)
>
> looking for "- ABC - DEF -" in "test - ABC - ABC - DEF -"
> as you need to backtrack as you have eaten too many characters, by the  
> time you get to the real match..

You're right. I didn't imagine that possibility (due in part to the way  
the original code sidestepped the problem with it's revolving buffer and  
custom compare function).

Regan



More information about the Digitalmars-d-learn mailing list