in reply to Re: Re: Slicing a string on words
in thread Slicing a string on words

I think it would be safest (and safe to assume) that a 1 Meg string will be stored in a file and terminated with some sort of CR and or LF and in fact the pattern match I have would require that to be the case. The pattern would get a lot more complex if you could end a string with a \S type of entity.

However you have noticed a problem with the original code with a start of 0. I will update that bit.