C# regex for assembly style hex numbers
问题 I'm new to regex and I want to highlight hexadecimal numbers in Assembly style. Like this: $00 $FF $1234 ($00) ($00,x) and even hexadecimal numbers that begin with #. So far I wrote "$[A-Fa-f0-9]+" to see if it highlights numbers beginning with $ but it doesn't. Why? And can someone help me with what I'm doing? Thanks. 回答1: Put a back slash before $ and your regex will work like so \$[A-Fa-f0-9]+ $ is a valid regex character that matches with end of string. So if your pattern contains dollar