Matt Clarkson | edfa60a | 2014-07-31 15:20:20 +0100 | [diff] [blame] | 1 | #include <regex> |
2 | #include <string> | ||||
3 | int main() { | ||||
4 | const std::string str = "test0159"; | ||||
Eric Fiselier | c5a362b | 2015-03-06 12:05:19 -0500 | [diff] [blame] | 5 | std::regex re; |
6 | re = std::regex("^[a-z]+[0-9]+$", | ||||
7 | std::regex_constants::extended | std::regex_constants::nosubs); | ||||
Matt Clarkson | edfa60a | 2014-07-31 15:20:20 +0100 | [diff] [blame] | 8 | return std::regex_search(str, re) ? 0 : -1; |
9 | } | ||||
10 |