From: "ara.t.howard" Date: 2008-11-06T15:15:22+09:00 Subject: Re: how to quickly find a string towards the end of a large io object On Nov 5, 2008, at 11:03 PM, bwv549 wrote: > How do I scan starting at the end of a big io object to find a string > that is always closer to then end? > > here's very roughly how the contents of the IO object look: > > Lots's of stuff... lot's of stuff....lot's of > stuff...."my_string_i_need"...lot's of stuff > > In other words, I have a massive IO object that I cannot reverse and I > need to very quickly find a string towards the end (but still fairly > far from the end). What's the fastest way to do this? > > Thanks in advance! binary search using seek. in all honestly though, it'd have to be really big to beat a regex if the entire file contents. define big? a @ http://codeforpeople.com/ -- we can deny everything, except that we have the possibility of being better. simply reflect on that. h.h. the 14th dalai lama