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

Sébastien Saint-Sevin seb-cl-mailist at matchix.com
Thu Oct 14 15:01:39 UTC 2004


> > 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?
>

It should. I'll have to try it.
How can I then abort the scan quickly, while avoiding funcalling the filter
with the rest of the string ? Something like (setf *start-pos*
end-of-string-value) ?

Thanks a lot, you're so good ;-)

Sebastien.





More information about the Cl-ppcre-devel mailing list