check if the string stris a hexadecimal number
str
bool isHexadecimal(String str) { return hexadecimalReg.hasMatch(str); }