There is a big difference - matches checks the match of a String
to a regular expression pattern, not the same string. Do not be mislead by the fact that it receives a String
as an argument.
For example:
"hello".equals(".*e.*"); // false
"hello".matches(".*e.*"); // true