[cl-ppcre-devel] Buffered multi-line question

Edi Weitz edi at agharta.de
Thu Oct 14 14:22:50 UTC 2004


On Thu, 14 Oct 2004 16:14:27 +0200, Sébastien Saint-Sevin <seb-cl-mailist at matchix.com> wrote:

> SECOND POINT
> ------------
>> Well, you could compute n from what you know but that would imply
>> creating a new regular expression for each iteration which is
>> probably not what you want.
>
> Can you confirm me that you see no other way of doing it?  Right now
> in my code, I just do the full scan and throw the results away if
> the start was to far in the string. I've not tried compiling a new
> regex at each iteration but I guess it will be longer.

With the new filter facility you should be able to create a filter
which checks the current position against some special variable, say
*MAX-START*. You can set *MAX-START* accordingly before each scan but
the regular expression will only be compiled once because it doesn't
change. Something like that should work, shouldn't it?

Cheers,
Edi.





More information about the Cl-ppcre-devel mailing list