I want to know if a string has any digits, or if there are no digits. Is there a function that easily does this?
boost::regex re("[0-9]"); const std::string src = "test 123 test"; boost::match_results what; bool search_result = boost::regex_search(src.begin(), src.end(), what, re, boost::match_default);