6 Replies Latest reply on Mar 12, 2014 2:30 AM by illustrate_this

    Replacing characters in string?




      I have a URL which contains the '%20' characters. Is there a way which i can replace this with a space?


      I have tried the following to replace the text in 'myText' symbol: ('theString' is a variable storing the URL)


      sym.$("myText").html("" + (theString.replaceAll("%20", " ")));



      But this doesnt work. However using replace instead of replaceAll method works but only replaces the first instance of %20 and not the rest of them?!


      Can anyone point me in the right direction?