Python 3.4 supports only 100 regex groups
github.com
github.com
On the other hand you can easily generate a regular expression by doing a little bit of trivial string manipulation everyone is going to understand.
Oh, I hate that kind of error message. Why couldn't it be something useful like
raise error("groups number is too large "
"(you have used %d out of an "
"allowed %d)" % (self.groups, MAXGROUPS))