Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

similar to Replace, but making 2 at the same time 1

Status
Not open for further replies.

DvDvDvDv

Programmer
May 24, 2001
100
PT
Hi all.

The replace funcion changes a substring in my string to another I chose.
What I need is to replace substring "A" for "B" and replace substring "B" for "A" at the same time.
Obviously, I can make 3 replaces to do that but, anyone knows a function to do that at once ?
Please help Me

Dv
 
Hello DvDvDvDv,

Make out a rarissmo letter combinations as place holder.
Code:
rarecom="@@@@@@@@@)))))))((((((((!!!!}}}}}}}}{{{{{"
A="stringA"
B="stringB"
s=replace(replace(replace(s,A,rarecom),B,A),rarecom,B)
regards - tsuji
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top