Posted By

sidneydekoning on 05/14/09


Tagged


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

Pingpongbal
tspitzr


Strip Whitespace with RegExp in AS3


 / Published in: ActionScript 3
 

  1. // pvalue has whitespace
  2. var whitespace:RegExp = /(\t|\n|\s{2,})/g;
  3. var trimmedValue:String = pValue.replace(whitespace, "");
  4. trace(pValue, trimmedValue);

Report this snippet  

You need to login to post a comment.