4 Replies Latest reply on Apr 17, 2011 1:07 PM by Roy Marshall

    [JS][regex] Question around forming a regex

    Roy Marshall Level 1

      Hi.

       

      I am trying to use a regex to filter out non url characters and replace with %20.  I have this line:

      myChangedError  = myErrorText.replace(/[-\w\.@\\]/g,"%20"); but it doesn't work.

      I am new to using Regex, and want to learn more, but this seems pretty basic, and I should be on to this!

       

      Can someone help?

       

      Many Thanks

       

      Roy