title: What is the difference between the regular expressions [^\d\s] and [\D\S]
body: <p>Can somebody explain the difference between <code>[^\d\s]</code> and <code>[\D\S]</code>?</p>
  
  <p>The description from <a href="http://www.regular-expressions.info/shorthand.html" rel="nofollow">http://www.regular-expressions.info/shorthand.html</a> is not really clear:</p>
  
  <blockquote>
    <p>Be careful when using the negated shorthands inside square brackets.
    <code>[\D\S]</code> is not the same as <code>[^\d\s]</code>. The latter matches any
    character that is neither a digit nor whitespace. It matches <code>x</code>, but
    not <code>8</code>. The former, however, matches any character that is either not
    a digit, or is not whitespace. Because all digits are not whitespace,
    and all whitespace characters are not digits, <code>[\D\S]</code> matches any
    character; digit, whitespace, or otherwise.</p>
  </blockquote>
  
  <p>They seem to be same for me. Or do I miss something?</p>