I am wondering why this is not matching. I tested my regular expression on notepad2 and it matches fine.
[FONT="Courier New"]std::string line = " 10 0 5 0";
std::regex rgx("\s+\d+\s+\d+\s+\d+\s+\d+");
if (regex_match(line, rgx))
{
// do something...
int a = 2;
}
Serena, thanks. But I also had to change isinteger function to isNumber. The following seems to work but let me know if I can make it better.
[FONT="Courier New"][SIZE="3"][SIZE="2"]inline bool isNumber(char *&src, double &number)
{
if (!isdigit(*src))
return false;
int integer = 0...