#include
#include
#include
bool is_hexadecimal(const std::string& str) {
return std::regex_match( str, std::regex("^(0x|0X)?[A-Fa-f0-9]+$") );
}
int main() {
std::string str;
std::cout << "Please enter hexadecimal number: "; </p>
std::cin >> str;
if (is_hexadecimal(str)) {
std::cout << "The entered string is hexadecimal\n";</p>
}
else {
std::cout << "The entered string is not hexadecimal \n"; </p>
}
return 0;
}