I have a string like
String string = \"number0 foobar number1 foofoo number2 bar bar bar bar number3 foobar\";
I need a regex to give me th
Pattern pattern = Pattern.compile("\\w+\\d(\\s\\w+)\1*"); Matcher matcher = pattern.matcher(string); while (matcher.find()) { System.out.println(matcher.group()); }