No.
For the matches()
method, the string must
completely match the regular expression.
For some other Java methods, a regular expression is used to
search a long text for a substring that matches.
However, String.matches()
requires the entire string to match.
Say that you have a program that interacts with the user. The user is expected to end the program by entering "Q" or "Quit" or "q" or "quit".
Does this sound like a place to use a regular expression?