I'm really struggling with regex in C++... do you know of a good resource where I can learn the proper syntax? Anyway, I would like something that would match any 3 numbers in parentheses, like (123), (284), (845) etc... I was thinking something like "([0-9][0-9][0-9])" but I don't think that will work. Here is what I have so far:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#include<iostream>
#include<regex>
#include<string>
int main()
{
std::string myString = "(123)";
std::regex myRegex (/* Not sure what to put here to match any string like above */);
if (std::regex_match (myString,myRegex))
std::cout << "Match found!\n";
return 0;
}