I have the following code:
private static final String ET_AL = \"(\\\\p{Punct}|\\\\b|^|\\\\s)et\\\\.? al\\\\.?(\\\\b|$|\\\\s)\";
private static final Pattern
but the call to m.matches() returns false.
It is because Matcher#matches() requires you to match complete input with your regex.
From Javadoc:
public boolean matches()
Attempts to match the entire region against the pattern. If the match succeeds then more information can be obtained via the start, end, and group methods.