D
Dr Nick
Kenneth Brody said:If all you pass it is a regex and a buffer pointer, why would you
expect it to do a "get next" on the second call? If you expect the
answer to be "because I passed the _same_ pointer both times, so it
should 'know' I meant to do 'get next' on it", then how would you ever
use it in a loop where the same buffer is passed, though the contents
have changed? (For example, something like "grep", which would print
any line that has a match to the regex.)
It could store a hash of the search string somewhere in the (opaque)
compiled regexp.
I know, I know. But I want to exercise my angels.