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:
01429947
Views:
126
This message has been marked as the solution to the initial question of the thread.
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
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform