1. Find any hexadecimal number in a larger body of text
[0-9a-fA-F]+
2. Check whether a text string holds just a hexadecimal number
A[0-9a-fA-F]+
3. Find a hexadecimal number with a 0x prefix
0x[0-9a-fA-F]+
4. Find a hexadecimal number with an &H prefix
&H[0-9a-fA-F]+
5. Find a hexadecimal number with an H suffix
[0-9a-fA-F]+H
6. Find a hexadecimal byte value or 8-bit number
[0-9a-fA-F]{2}
7. Find a hexadecimal word value or 16-bit number
[0-9a-fA-F]{4}
8. Find a hexadecimal double word value or 32-bit number
[0-9a-fA-F]{8}
9. Find a hexadecimal quad word value or 64-bit number
[0-9a-fA-F]{16}
10. Find a string of hexadecimal bytes (i.e., an even number of hexadecimal digits)
(?:[0-9a-fA-F]{2})+
11. Find any hexadecimal number standalone in a larger body of text
(?:^|(?<=s))[0-9a-fA-F]+(?=$|s)
[bibliography]
http://blog.csdn.net/guaguastd/article/details/38920565