About
Pricing
Community
Teams
Start Free Trial
Log in
Mike_Stevens
asked on
2/27/2009
Search string and replace characters
I need to search a string value and replace predefined characters. As an example:
I need to replace @, %, & with an X in the following string value
34@Mnkee%ssss&kpoilops@ggh
h
I am sure this can be done but and not sure how to do it.
Visual Basic.NET
Microsoft Development
2
1
Last Comment
zstapic
8/22/2022 - Mon
Daniel Reynolds
2/27/2009
the following should do it.
mystring = mystring.Replace("@", "X").Replace("%","X").Repl
ace("&","X
")
ASKER CERTIFIED SOLUTION
zstapic
2/27/2009
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Your help has saved me hundreds of hours of internet surfing.
fblack61
mystring = mystring.Replace("@", "X").Replace("%","X").Repl