clear lcstring = "RGB(123,124, 125, 126, 127, 128)" ? lcstring oRE = CREATEOBJECT("VBScript.RegExp") oRE.Pattern = "(\d+)\, (\d+)\, (\d+)\, (\d+)\, (\d+)\, (\d+)" ? oRE.Replace(lcstring, "$4, $5, $6, $1, $2, $3")OOPS, never mind, I just figured out that spaces matter. The below works:
clear lcstring = "RGB(123, 124, 125, 126, 127, 128)" ? lcstring oRE = CREATEOBJECT("VBScript.RegExp") oRE.Pattern = "(\d+)\, (\d+)\, (\d+)\, (\d+)\, (\d+)\, (\d+)" ? oRE.Replace(lcstring, "$4, $5, $6, $1, $2, $3")>Whoops! Just read Steve's post...Make that
lcstring = "RGB(0, 0, 0, 255, 255, 255)" >oRE = CREATEOBJECT("VBScript.RegExp") >oRE.Pattern = "(\d+)\, (\d+)\, (\d+)\, (\d+)\, (\d+)\, (\d+)" >? oRE.Replace(lcstring, "$4, $5, $6, $1, $2, $3")