title: How to match a string's end using a regex pattern in Java?
body: <p>I want a regular expression pattern that will match with the end of a string.</p>
  <p>I'm implementing a stemming algorithm that will remove suffixes of a word.</p>
  <p>E.g. for a word 'Developers' it should match 's'.<br />
  I can do it using following code :</p>
  <pre><code>Pattern  p = Pattern.compile(&quot;s&quot;);
  Matcher m = p.matcher(&quot;Developers&quot;);
  m.replaceAll(&quot; &quot;); // it will replace all 's' with ' '
  </code></pre>
  <p>I want a regular expression that will match only a string's end something like <code>replaceLast()</code>.</p>