title: How to validate characters, numbers and special characters using jQuery regular expression?
body: <p>I am trying to validate password field such that it accepts characters, numbers and also special characters. <strong>It must accept exactly 8 characters</strong>. I have searched for it in the internet but I was not able to get any specific answer and if getting its not working.</p>
  
  <p>Let me just give an explanation of the characters the password must accept:
  <strong>A-Z, a-z, 0-9, ~!@#$%^&amp;*()_-+=.|&lt;>?{}[]</strong></p>
  
  <p>So, valid password would be: <code>ankit@19</code>, <code>a_g-1#87</code>, etc.
  Invalid password would be: <code>ag/ i(91</code> (because it is having space and '<code>/</code>' in it)</p>
  
  <p>The regular expression I am using right now is:</p>
  
  <pre><code>/^[A-Za-z0-9?=\.~!@#\$%^&amp;*()_-|&lt;&gt;{}\[\]]{8}$/
  </code></pre>
  
  <p>This one is not working at all. Please help me to get the right way to do this.</p>