C ++ to do a project, use regular expressions when I want to express all digital, I set the variable like this:
regex reg("^[1-9][0-9] * $");
Not always determined by the time.
By chance behind the box to remove the inter-symbol, we get the results I want:
regex reg("^[1-9][0-9]*$");
In order to remind ourselves that the space will compile the regular expression, not just add a space.
Space can \ s representation
In addition, look for this error, I got most of the language platforms are not the '\' as an escape character. To be written in '\\ s' to the '\' escape