Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to remove a single \ to \\

    Hi all,

    I have a string with a '\' character and need to add one more \ to make it two.

    example

    var str="melton \john"

    result

    str should be "melton \\john"

    Thanks in advance

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    10,965
    Thanks
    0
    Thanked 236 Times in 233 Posts
    Is the value of str variable dynamically generated on the server-side? If yes, then you need to do the replacement of \ to \\ in the server-side.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •