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?
System.out.println(\"I end with
try this:
System.out.println("I end with a number 4".matches(".*\\d\$"));