[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


How to replace 2 characters in a string?

Posted on 2011-10-11
Medium Priority
Last Modified: 2012-05-12
How can I replace a "/" with and"@" and a "(" with a "_" that resides in a pipe delimited text string?  I can do it individually, but not combined with the below

replace(split ({myfield},"!")[3], "/","@")
replace(split ({myfield},"!")[3], "(","_")

Thank you very much.
Question by:kgittinger
LVL 101

Accepted Solution

mlmcc earned 2000 total points
ID: 36952351
Two ways

Local StringVar strOut;
strOut := replace(split ({myfield},"!")[3], "/","@") ;
strOut := replace(strOut,"(","_") ;

The other way

replace(replace(split ({myfield},"!")[3], "/","@"),"(","_")



Author Closing Comment

ID: 36952758
Great.  Thank you for the information.

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question