Yeah, I've already got the UDF written, I was just thinking how nice
it would be if I could manipulate the backreference directly. It would
simplify the code a lot.

Thanks,
Jamie

On Thu, 05 Feb 2004 13:50:27 -0500, in cf-talk you wrote:

>Not directly, that I've ever been able to figure out.  What I have done
>(though it's kind of a pain) is to use refind to grab out the bits I
>want, and do something like
>
>string = left(string, pos[1] - 1) & emailAntiSpam(mid(string, pos[1],
>len[1])) & right(string, pos[1]+len[1]+1, len(string));
>
>Loop over this until pos[1] = 0;
>
>Ugly, but it works.
>
>Not that it will probably help you do what you're trying to do.  :-(
>
>--Ben Doom
>
>Jamie Jackson wrote:
>
>> I just wrote a UDF to do a rereplace with manipulated backreference
>> values. Specifically, it replaces all instances of email addresses in
>> a string with "antiSpam" email addresses.
>>
>> However, I'm wondering if there was an easier way...
>>
>> Is there any magic shortcut, similar to this (illegal) pseudo-code?
>> (i.e. Is there a way to manipulate the backreferenced value within the
>> rereplace function?)
>>
>> rereplace(str,
>>           "([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-]+)+",
>>           emailAntiSpam(\1),
>>           "all");
>>
>> Thanks,
>> Jamie
>>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to