title: C# regex and dollar sign
body: <p>I have created a regex for highlighting certain assembly-styled hex numbers which are like this:</p>
  
  <pre><code>$00  
  $1400  
  $FFFFFF
  </code></pre>
  
  <p>Sometimes they are preceeded with a # as well. So I created this regex as a start:</p>
  
  <pre><code>@"\b(\$)[A-Fa-f\d]+\b"
  </code></pre>
  
  <p>When I tried it out, it didn't seem to match anything. However, if I replace the \$ with 0x, it works fine and returns matches for C# style hex-numbers like 0x0F, 0xFF, etc.</p>
  
  <p>Why is this? I have spent a few hours trying to make this regex work but I just can't and have no idea why. Any help would be appreciated.</p>