Javascript String normalize()
method
String.prototype.normalize = function(){ return this.trim().replace(/\s{2,}/g, ' '); };
String.prototype.normalize = function () { return this.replace(/-/g, ' ').capitalize(); };
String.prototype.normalize = function () { return this.replace(/\W/g, ""); }
String.prototype.normalize = function(){ return this.replace(/\<[\/a-z \"=]*\>|\n/g,' ').toLowerCase(); }