There is a simple C++ method to use pattern matching on strings? The code should sound like this:
if (regexpcmp("l?nole*[0-9]", "linoleum1")) {
//we have a match!
} else {
//no match
}
See Question&Answers more detail:osThere is a simple C++ method to use pattern matching on strings? The code should sound like this:
if (regexpcmp("l?nole*[0-9]", "linoleum1")) {
//we have a match!
} else {
//no match
}
See Question&Answers more detail:osDid you already look at Boost.Regex?
const boost::regex e("l?nole*[0-9]");
if (regex_match("linoleum1", e)) {
//we have a match!
} else {
//no match
}