here is the code:
It's find when there are 31 groups:
try
{
regex re("(0)(1)(2)(3)(4)(5)(6)(7)(8)(9)(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)(m)(n)(o)(p)(q)(r)(s)(t)(u)", tr1::regex::icase);
}
catch (regex_error e)
{
std::cout << e.what();
}
However, I try to add one more group (total 32 groups), oops:
try
{
regex re("(0)(1)(2)(3)(4)(5)(6)(7)(8)(9)(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)(m)(n)(o)(p)(q)(r)(s)(t)(u)(v)", tr1::regex::icase);
}
catch (regex_error e)
{
std::cout << e.what();
}
a regex_error exception is caught and print
regular expression error
I use VisualStudio 2010 on Windows 7
It seems there is max limit of groups. How can I break the limit?
Im not sure about the windows version but the gcc version only has partial support
http://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#status.iso.2011
Its section 28 your looking at. Other languages seem to be able to match more groups
maybe try a differnt engine ?
http://en.wikipedia.org/wiki/Comparison_of_regular_expression_engines
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With