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")