File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java 7 regular expressions, get list of named groups

 
Don Blodgett
Ranch Hand
Posts: 61
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a way of getting a list of named groups in a regular expression without knowing those names ahead of time other than parsing the regular expression to look for the named capture groups? It would be very simple to do that, but I feel that I would be doing something that is already easily at hand, or should be.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic