Back to Tutorial Paste Your Code here! <script> var punctuation = /[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,\-.\/:;<=>?@\[\]^_`{|}~]/g; var spaceRE = /\s+/g; var str = "Hi! Am@@@ I Experts$ PHP.?"; var testStr = str.replace(punctuation, '').replace(spaceRE, ' '); document.write('<strong>Output: </strong>' + testStr); </script> Output