Re: [pcre-dev] Searching a big file with PCRE

Αρχική Σελίδα
Delete this message
Συντάκτης: Philip Hazel
Ημερομηνία:  
Προς: Maël Hörz
Υ/ο: pcre-dev
Αντικείμενο: Re: [pcre-dev] Searching a big file with PCRE
On Fri, 4 Apr 2008, Maël Hörz wrote:

> Thanks for your answer. This pretty much looks like what I need, though if I
> understood the documentation correctly the dfa-algorithm doesn't support back
> references and capturing parentheses.


I am afraid you have understood the documentation correctly. :-(

> Is is possible to track the progress (to show in a progress bar) of pcre_exec
> (not pcre_dfa_exec)?


No.

> Because if it is, it might be possible to implement a callback
> function that requests the parts of the subject stream when they are
> needed, allowing to pass small chunks "on demand").


Already on the wishlist is a suggestion similar to that. Instead of just
loading a character from memory, PCRE would call a function to "get next
character", or "get character number xxxx". This would of course slow it
down a lot, but would make it possible to do what you want. For
performance reasons, this would require a specially compiled version of
PCRE. However, I don't know if/when this extension is likely to be
implemented.

Philip

--
Philip Hazel