Posted By

gromitski on 02/28/11


regex actionscript

Versions (?)

Remove non alpha numeric characters from a string

 / Published in: ActionScript


Useful for stripping out backslashes, hyphens and other punctuation

  1. var r:RegExp = new RegExp(/[^a-zA-Z 0-9]+/g) ;
  2. yourString = yourString.replace(r, "");

Report this snippet  

You need to login to post a comment.