title: Regular expression for all printable characters in JavaScript
body: <p>Looking for a regular expression for that validates all printable characters. The regex needs to be used in JavaScript only. I have gone through <a href="https://stackoverflow.com/questions/1247762/regex-for-all-printable-characters">this</a> post but it mostly talks about .net, Java and C but not JavaScript.</p>
  <p>You have to allow only these printable characters :</p>
  <blockquote>
  <p>a-z, A-Z, 0-9, and the thirty-two symbols: !&quot;#$%&amp;'()*+,-./:;&lt;=&gt;?@[] ^_`{|}~ and space</p>
  </blockquote>
  <p>Need a JavaScript regex to validate the input characters is one of the above and discard the rest.</p>