-(defconst -num3-number-re
- (concat "\\(?:0[xX]\\|#\\)\\([0-9a-fA-F]+\\)" ; 1 = hexadecimal
- "\\|\\([0-9]+\\)" ; 2 = decimal
- "\\|\\.\\([0-9]+\\)")) ; 3 = fraction
+(defconst num3--number-re
+ (concat "[0#][xX]\\([[:xdigit:]]+\\)" ; 1 = hexadecimal
+ "\\|\\(?1:\\b\\(?:[0-9]+[a-fA-F]\\|" ; 1 = hexadecimal
+ "[a-fA-F]+[0-9]\\)[[:xdigit:]]*\\b\\)"
+ "\\|\\([0-9]+\\)" ; 2 = decimal
+ "\\|\\.\\([0-9]+\\)")) ; 3 = fraction