in reply to Re: Re: Slicing a string on wordsin thread Slicing a string on words
The whiles in my update should bail out when they run out of matches.
You may test on some input but it seems to take equal or less than window just fine