Remove non alpha numeric characters from a string

/ Published in: ActionScript
Save to your folder(s)

Useful for stripping out backslashes, hyphens and other punctuation

Copy this code and paste it in your HTML
  1. var r:RegExp = new RegExp(/[^a-zA-Z 0-9]+/g) ;
  2. yourString = yourString.replace(r, "");


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.