Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Regular Expressions
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01429937
Message ID:
01429968
Views:
67
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform