On Tue, Feb 9, 2016 at 5:07 PM, Sven Van Caekenberghe <sven@stfx.eu> wrote:

> On 09 Feb 2016, at 19:54, Stephan Eggermont <stephan@stack.nl> wrote:
>
> On 09/02/16 14:01, Sven Van Caekenberghe wrote:
>> Leonardo,
>>
>> You could try PositionalStream>>#upToAll:
>>
>> But watch out: if the substring does not occur, it will effectively read #upToEnd
>
> Also, for searching for substrings in long strings this is extremely slow, much slower than BMH and KMP

Yes, true. I wanted to say something similar.

But we don't how he is using it, or for what, maybe it is just some one off code that is not used frequently or totally not performance critical.

I am sad to hear all that, I thought my problem was solved. :-)
I basically open a txt file to look for the information I want. This txt file is the output of an external framework. I cannot change its structure.
I believe that performance can be indeed an issue depending on the size of the file and the number of operations executed.
I will study other alternatives.

Cheers,