good point, thanks. that was part of the problem. 
  ----- Original Message ----- 
  From: caffeinewabbit 
  To: [email protected] 
  Sent: Wednesday, October 03, 2007 3:23 PM
  Subject: [flexcoders] Re: remove all spaces using RegExp


  Are you remembering to assign the new value back to your variable?

  i.e.:

  coordinatesStr = coordinatesStr.replace("\\s+","");

  Greg C.

  --- In [email protected], "Matthew Ganz" <[EMAIL PROTECTED]> wrote:
  >
  > hi.
  > 
  > i've got a string with a bunch of extra spaces in it; line breaks,
  tabs, etc...for some reason when i try to RegExp it, it doesn't remove
  it. anything wrong with this statement??
  > 
  > coordinatesStr.replace("\\s+",""); // doesn't remove any spaces
  > 
  > i've tried this and it still doesn't work:
  > var myPattern:RegExp = /\\s+\g;
  > coordinatesStr.replace(myPattern,"");
  > 
  > any tips are very much appreciated. thank you. -- matt.
  >



   

Reply via email to