2 Replies Latest reply on Jun 18, 2008 3:02 AM by (Lee_Fielding)

    [JS - CS3]  Can't REPLACE A with B within a string? Help Please...

      Hello Experts,
      First off - I'm a newbee to all this JS and especially with CS3.

      I have a string: '
      b myDocumentName
      which can have it's value as: '
      b 00000en_ Generator WX/WY
      Problem is, backshlashes ( / )are a bad thing for me...

      b Question:

      How can I do a 'replace' operation to replace the '/' from the string with a '_'?

      I have at the moment:
      > var myDocSaveName = oneResult[3]+oneResult[4]+oneResult[5];
      > myDocSaveName.replace(what "/", with "");
      > myDoc.save ("C:/DATA/"+myDocSaveName, undefined, undefined, true)

      I get an error Nr. 25... Offending text:"/"
      What am I doing wrong?