Neither of these are correct as Hex is case insensitive and both of these regex's are. Hex is most commonly lowercase (unless you're Data::UUID), but that's an aesthetic, not a requirement. The best way to match Hex is using a POSIX character class.
[a-f0-9] or [A-F0-9]
which matches this in a more readable manner, and intent driven manner
[[:xdigit:]] or \x
as a side note it's this in a regex string in Java