Answer the question
In order to leave comments, you need to log in
How to build such a regular expression?
You want to write a function that returns a regular expression to check if a string is an unsigned integer (with arbitrary indentation).
std::regex getRegex(unsigned length, unsigned minLength)
{
std::assert(minLength <= length);
// ...
}
12345
2345
345
45
5
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question