title: Regular Expression for the end of a sentence
body: <p>I'm trying to match a pattern in Java / Android with regular expressions. The pattern is "consonant" - "vowel" - "s" at the end of a String, like in "similares" and "científicas", but not like in "process".</p>
  
  <p>My code:</p>
  
  <pre><code>Pattern pat = Pattern.compile("[^aeiou][aeiou]s\\b");
  Matcher matcher = pat.matcher(word);
  
  Log.e(TAG, word + " contains pattern? " + matcher.matches()  );
  </code></pre>
  
  <p>This tester says I'm correct:</p>
  
  <p><a href="https://regex101.com/" rel="nofollow noreferrer">https://regex101.com/</a></p>
  
  <p>This one, which is Java specific, tells me I'm correct as well:</p>
  
  <p><a href="https://www.freeformatter.com/java-regex-tester.html#ad-output" rel="nofollow noreferrer">https://www.freeformatter.com/java-regex-tester.html#ad-output</a></p>
  
  <p>But in my Android app, I am unable to make them match.</p>
  
  <p>My output:</p>
  
  <pre><code>activ contains pattern? false
  program contains pattern? false
  informá contains pattern? false
  consult contains pattern? false
  process contains pattern? false
  dados contains pattern? false
  domicili contains pattern? false
  inform contains pattern? false
  relacion contains pattern? false
  outr contains pattern? false
  consultoria contains pattern? false
  científicas contains pattern? false
  técn contains pattern? false
  similares contains pattern? false
  </code></pre>
  
  <p>I also tested for</p>
  
  <pre><code>"[^aeiou][aeiou]s$"
  </code></pre>
  
  <p>and</p>
  
  <pre><code>"[^aeiou][aeiou][s]\\b"
  </code></pre>
  
  <p>What am I missing?</p>