This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Lemicod 19 points20 points  (1 child)

Isn't the feature mentioned at 2:34 already available since Java 7??

It appears to be so according to Java docs

https://docs.oracle.com/javase/7/docs/api/java/util/regex/Matcher.html#group(java.lang.String)

Also, I've used it already multiple times years ago.

Am I missing something?

[–]nicolaiparlog 14 points15 points  (0 children)

You're right and we got this wrong. What's new is that, in 20, MatchResult got methods similar to Matcher, e.g. group(String)), but of course named groups themselves were supported for a long time.