1

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?

Grzenio
  • 35,875
  • 47
  • 158
  • 240