I need to find a reg ex that only allows alphanumeric. So far, everyone I try only works if the string is alphanumeric, meaning contains both a letter and a number. I just w
Extend the string prototype to use throughout your project
String.prototype.alphaNumeric = function() { return this.replace(/[^a-z0-9]/gi,''); }
Usage:
"I don't know what to say?".alphaNumeric(); //Idontknowwhattosay