Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Regular Expressions
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01429937
Message ID:
01429968
Vues:
66
Thanks, that did the trick!

>Something like this? (Not very refined)
>
>
>clear
>TEXT TO lcList NOSHOW FLAGS 1 PRETEXT 1 + 2 + 4
>	Vic: Lastname, Firstname
>	Vic: abc, def
>	Vic: xyz, wrt
>	Vic: test, test
>	Vic: somelastname, someFirstname
>	Vic: hugo, victor
>ENDTEXT
>
>loRegEx			= Createobject('VBScript.RegExp')			&& Create a regular expression.
>lcRetStr			= ''
>with loRegEx as VBScript.RegExp
>	.Pattern		= '(Vic: )(\w+, *)(\w+)'		&& Set pattern.
>	.IgnoreCase		= .T.						&& Set case insensitivity.
>	.Global			= .T.						&& Set global applicability.	   
>	
>	lcRetStr		= .Replace(lcList, '$2*****')
>ENDWITH
>	
>? lcRetStr
>
John Harvey
Shelbynet.com

"I'm addicted to placebos. I could quit, but it wouldn't matter." Stephen Wright
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform