[cl-ppcre-devel] Replacing all matches for a given register
Daniel Gackle
gackle at shaw.ca
Tue Aug 15 06:45:03 UTC 2006
Thanks. My mistake was thinking there were two options - replacement string
and simple calls - when in fact there are three, the third being the
function call I'm looking for.
Daniel
-----Original Message-----
From: Edi Weitz [mailto:edi at agharta.de]
Sent: Sunday, August 13, 2006 4:41 PM
To: Daniel Gackle
Cc: cl-ppcre-devel at common-lisp.net
Subject: Re: [cl-ppcre-devel] Replacing all matches for a given register
On Sun, 13 Aug 2006 14:53:06 -0600, Daniel Gackle <gackle at shaw.ca> wrote:
> I have a regex with more than one register and wish to replace each
> occurrence of one of those registers using a replacement
> function. I've written code to do this using do-scans, but it seems
> like there should be a simpler way. Is there?
Not much simpler, I think. I'd use REGEX-REPLACE with a replacement
function in your case. Note that (if you don't use the "simple calls"
option) your function will be called with all the information you'll
need. Have you tried that?
More information about the Cl-ppcre-devel
mailing list