JDK-8320680 : MatchResult.group(String) missing
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.util.regex
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2023-11-23
  • Updated: 2023-11-25
  • Resolved: 2023-11-25
Related Reports
Duplicate :  
Description
A DESCRIPTION OF THE PROBLEM :
MatchResult shall provide the results of a Match given by a Matcher. 
This comprises also matching of groups. 
But missing is one single method referring to named groups. 



CUSTOMER SUBMITTED WORKAROUND :
I rely heavily on named groups because numbered groups are not maintainable. 
Thus i am forced to use a Matcher instead of a MatchResult, which breaks some info hiding. 

FREQUENCY : always



Comments
Moved to JDK as an enhancement.
24-11-2023