C# regex and dollar sign
I have created a regex for highlighting certain assembly-styled hex numbers which are like this:

$00  
$1400  
$FFFFFF

Sometimes they are preceeded with a # as well. So I created this regex as a start:

    @"\b(\$)[A-Fa-f\d]+\b"

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.

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.
C# regex and dollar sign
===

I have created a regex for highlighting certain assembly-styled hex numbers which are like this:

$00  
$1400  
$FFFFFF

Sometimes they are preceeded with a # as well. So I created this regex as a start:

    @"\b(\$)[A-Fa-f\d]+\b"

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.

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.