0

I had assumed the maximum was 9 but after some experimentation I know it is not. The javadocs for Pattern and Matcher to not list a maximum.

2
  • 2
    Why did you assume the maximum was 9? Commented Jun 18, 2009 at 0:16
  • 2
    There are regex flavors that limit you to nine groups; Jakarta Regexp is one of them Commented Jun 18, 2009 at 1:06

1 Answer 1

5

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.