[cl-ppcre-devel] Re: Cl-ppcre usage

Edi Weitz edi at agharta.de
Tue Sep 28 23:18:58 UTC 2004


Hi Sébastien!

On Tue, 28 Sep 2004 16:12:21 +0200, Sébastien Saint-Sevin <seb at matchix.com> wrote:

> I've got two questions regarding cl-ppcre usage.
>
> 1) do-scans
> I need to use multi-matching within a string so I use do-scans.
> However, I've got some troubles when I use ^ to force a match at the
> begining of the string.  It's like the start of the string is
> constantly reinit after each match within the string (and this is
> not what I want as you already suppose).
>
> Is there a way to do it?

I'm not really sure what you want to achieve - maybe an example would
help. If your search pattern contains ^ then it can only match once,
right? Have you looked at the m modifier?

> 2) user hook
> I want to combine regex and some kind of lookup tables (hash-table
> that stores string).  In Michael parker's regex engine, it is
> possible to give the engine a user hook function that, when a match
> is found, check it against this user function to finally validate
> it, otherwise backtrack the matching.
>
> How can I do that with CL-PPCRE ? (where do I need to hack the code
> otherwise ? ;-))

I have plans to implement this in the future but my current workload
and other projects don't allow me to do that. If you provide a clean
patch which implements this functionality I'd be glad to integrate
it. (In my opinion this should only be possible in parse trees,
though, in order not to break Perl compatibility.)

Cheers,
Edi.




More information about the Cl-ppcre-devel mailing list