If I was an Ostrich, I'd stick my head in the sand right about now! :o) You are the first one to catch the obvious. I shouldn't be reversing the order at all, but switching the pairs as your example clearly does quite well. What was I thinking? (I obviously wasn't!) Thanks Steve!
>What are your requirements? Completely reverse the order, or switch the two pairs of rgb() settings? I assumed switch the pairs...
>
>Didn't see any advantage to using a loop to reconstruct:
>
>
>local lcInside, laBusted, lcReturn
>dimension laBusted[1]
>
>oldval="RGB(0,0,0,255,255,255)"
>lcInside = substr(oldVal, at("(",oldVal)+1)
>lcInside = left(alltrim(lcInside), len(alltrim(lcInside))-1)
>
>if alines(laBusted, lcInside, ",") = 6
> lcReturn = "rgb(" + laBusted[4] + "," + laBusted[5] + "," + laBusted[6] + "," + ;
> laBusted[1] + "," + laBusted[2] + "," + laBusted[3] + ;
> ")"
>else
> error "invalid source string"
>endif
>? lcReturn>
>
>>
.·*´¨)
.·`TCH
(..·*
010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"