Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
REVERSE RGB(0,0,0,255,255,255) to RGB(255,255,255,0,0,0)
Message
 
 
À
13/06/2003 12:34:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00799797
Message ID:
00800047
Vues:
34
Tracy,

You can change pattern a little bit to accommodate spaces around ','
oRE.Pattern = "(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)"
>
>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")
>
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform