replace all non alphabetic characters javascript code example Example: replace non alphanumeric javascript text.replace(/[\W_]+/g," ");