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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replace Multiple Characters?

Status
Not open for further replies.

iXPhound

Technical User
Feb 25, 2001
146
US
Hi All:

Hopefully this is an easy one for the more experienced out there. I have a field that contains a rather lenghty string. In this string I want to remove multiple "sets" of characters: "CN=", "OU=", "DC=", and so on. I tried doing a replace: Replace(fld, "CN=", "")but I am not sure how to do more than one replace. Any ideas are greatly appreciated.

TIA!!
 
Please help! Im new to this and I can't find assistance anywhere.
 
you can do it one of two ways..

assign it to a variable:

stringvar excluded;

excluded := {table.field};

excluded := replace(excluded,"xx","");
excluded := replace(excluded,"yy","");
etc..

excluded

or two.. embed them (i like the one above better)

replace(replace(replace({table,field},"xx",""),"yy",""),"zz","")

Lisa
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top