MCPcopy Index your code
hub / github.com/BruceEckel/OnJava8-Examples / main

Method main

strings/Groups.java:17–26  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

15 "Beware the Jubjub bird, and shun\n" +
16 "The frumious Bandersnatch.";
17 public static void main(String[] args) {
18 Matcher m = Pattern.compile(
19 "(?m)(\\S+)\\s+((\\S+)\\s+(\\S+))$")
20 .matcher(POEM);
21 while(m.find()) {
22 for(int j = 0; j <= m.groupCount(); j++)
23 System.out.print("[" + m.group(j) + "]");
24 System.out.println();
25 }
26 }
27}
28/* Output:
29[the slithy toves][the][slithy toves][slithy][toves]

Callers

nothing calls this directly

Calls 1

printMethod · 0.80

Tested by

no test coverage detected