You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This lightweight library adds support for [named capture groups](http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html#groupname) in Java 5/6 (and on Android).
5
-
6
-
This is a fork of the [named-regexp](http://code.google.com/p/named-regexp) project from Google Code (currently inactive).
7
-
4
+
This library backports [named capture groups](http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html#groupname) from Java 7 to Java 5/6.
8
5
9
6
Usage
10
7
-----
11
-
You can use the same constructs for named capture groups from Java 7 (i.e., `(?<name>patt)`, etc.), as in the following example:
8
+
You can use the same constructs for named capture groups from Java 7
9
+
(i.e., `(?<name>patt)`, etc.), as in the following example:
Matchermatcher = pattern.matcher("1 Sunday foo bar 2 Monday foo bar 3 Tuesday foo bar 4 Wednesday foo bar 5 Thursday foo bar 6 Friday foo bar 7 Saturday foo bar 8 Sunday foo bar 9 Monday foo bar 10 Tuesday foo bar ");
770
770
771
-
finalList<Map<String, String>> groups = matcher.namedGroups();
771
+
finalList<Map<String, String>> groups = matcher.namedGroupsList();
0 commit comments