How to replace 2 characters in a string?

Posted on 2011-10-11
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 100

    Accepted Solution

    Two ways

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

    The other way

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



    Author Closing Comment

    Great.  Thank you for the information.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    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…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    779 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

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now