Edit in JSFiddle


              
  <body onload='RegexColorizer.colorizeAll()'>
      
      <pre class="regex">.   Dot, any character (may or may not match line terminators, read on)
\d   A digit: [0-9]
\D   A non-digit: [^0-9]
\s   A whitespace character: [ \t\n\x0B\f\r]
\S   A non-whitespace character: [^\s]
\w   A word character: [a-zA-Z_0-9]
\W   A non-word character: [^\w]
</pre>
</body>

              

External resources loaded into this fiddle: