I tried \b (This means the last character of a word) in the Java Regexp, but this doesn't work.
String input = "aaa aaa";
Pattern pattern = Pattern.compile("(a\b)");
Matcher matcher = pattern.matcher(input);
while (matcher.find()) {
System.out.println("Found this wiki word: " + matcher.group());
}
What in the problem?
\bdoes not mean "last character of a word" but "boundary between word and non-word"."a\\b", and see other comments about\b), your groups will always containaonly. So, what is it you want to do?