title: Regex to test if a string ends with a number
body: <p>I'd like to test if a string ends with a a digit.  I expect the following Java line to print true.  Why does it print false?</p>
  
  <pre><code>System.out.println("I end with a number 4".matches("\\d$"));
  </code></pre>