replace any alphabetic character not number js code example Example: replace non alphanumeric javascript text.replace(/[\W_]+/g," ");