I am trying to use really straightforward regular expressions to match strings like 2001M12
. I create a std::regex
object as follows:
std::regex gretlMonth("^[:d:]{4}M[:d:]{2}$");
but I get the following runtime exception on this line:
unknown location(0): fatal error in "Plot_GuessesTimeFormat": std::runtime_error: regex_error
What am I doing wrong?