I want a regular expression pattern that will match with the end of a string.
I\'m implementing a stemming algorithm that will remove suffixes of a word.
E.g. for
public static void main(String[] args) { String message = "hi this message is a test message"; message = message.replaceAll("message$", "email"); System.out.println(message); }
Check this, http://docs.oracle.com/javase/tutorial/essential/regex/bounds.html