Ah, nice try... but I have it...

this function...
rereplace("One,1,Two,2,Three,3,Four,4,Five,5,","([^,]+)/([^,]+)(,|$)","\1=\2
%","ALL");

will give you this...
One=1%Two=2%Three=3%Four=4%Five=5%

Then you can trim the last character off, and you are set to go. (Boy, this
is my first attempt at backreferencing... what a start!) Thought I would
share the solution for anyone else who needed some tips.

John Farrar

----- Original Message -----
From: "Harry Klein" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 01, 2003 1:02 PM
Subject: RE: [CFCDev] OT: RegEx GURUs HELP!!!


Hi John,

i think this is not possible with a regex
ReReplace(string,"([[:alpha:]]+,[0-9]+,)",ListFirst(\1)=ListGetAt(\1,2)@
,"ALL") would be nice ;-)

i would use a loop insted (step=2)

cheers,
Harry Klein

> -----Original Message-----
> From: John Farrar [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 01, 2003 6:41 PM
> To: [EMAIL PROTECTED]
> Subject: [CFCDev] OT: RegEx GURUs HELP!!!
>
>
> Anyone know how to write a backreference to replace every
> other occurance of
> an character with alternating characters.
>
> I.E.
>
> List - One,1,Two,2,Three,3,Four,4,Five,5
> Result - [EMAIL PROTECTED]@[EMAIL PROTECTED]@Five=5
>
> Thanks,
>
> John Farrar
>
>
>
> ----------------------------------------------------------
> You are subscribed to cfcdev. To unsubscribe, send an email
> to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev'
> in the message of the email.
>
> CFCDev is run by CFCZone (www.cfczone.org) and supported
> by Mindtool, Corporation (www.mindtool.com).
>
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev'
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).





----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

Reply via email to