BEFORE it is passed to the actual REreplace function. So there's no way to
do anything with the stuff the backreference matches except stick it in the
replace string somewhere.
Cheers,
barneyb
> -----Original Message-----
> From: Jamie Jackson [mailto:[EMAIL PROTECTED]
> Sent: Thursday, February 05, 2004 12:43 PM
> To: CF-Talk
> Subject: Re: REReplace: Manipulating Backreferences
>
> That's not quite what I've got going on. Notice that while you used
> backreferences, you didn't *process* them at all. (Maybe that's how I
> should have phrased it: "Is it possible to *process* backreferences
> within REReplace?")
>
> Please remember that AFAIK, what I'm asking about is impossible, but I
> was just making sure. Also, please note that I don't need help getting
> this to work in another way (i.e. with a loop), as I have already made
> a UDF that does it the "hard" way.
>
> <cfsavecontent variable="myString">
> [EMAIL PROTECTED] hello [EMAIL PROTECTED] goodbye
> </cfsavecontent>
> <cfscript>
> // keep in mind that this is just illegal pseudocode
> myString = rereplace(str,
> "([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-]+)+",
> emailAntiSpam(\1),
> "all");
> </cfscript>
> <cfoutput>
> #myString#
> </cfoutput>
>
> ############### DESIRED YIELD ###############
> foo@bar.com hello
> jim@jam.com goodbye
>
> Thanks,
> Jamie
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

