Link to home
Start Free TrialLog in
Avatar of gthgb
gthgb

asked on

Detect and replace in a String

looking for a bit of code that would find all of "Teh" and replace it with "The"
(and no i dont need a spell checker)
Avatar of jjardine
jjardine
Flag of United States of America image

Replace(string,find,replacewith[,start[,count[,compare]]])

Ex.
YourString = Replace (YourString,"teh","the")
Avatar of aelatik
StringReplaced = Replace("The string to search in", "Teh", "The")
MsgBox StringReplaced
ASKER CERTIFIED SOLUTION
Avatar of aelatik
aelatik
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gthgb
gthgb

ASKER

overkill :) thanks