Maximum number of groups in Java Regex
Solution
There's no explicit ceiling, so theoretically the max would be Integer.MAX_VALUE. Practically speaking, the max will vary according the resources available, but I'm sure it's a lot more than you'll ever need.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow