I'm not sure but could it be because 'match' does a complete match & would not settle for anything less whereas 'pattern' returns true even if a 'minimum' match is found?
I assume that you mean String's matches() method by 'match' and Pattern.compile(),Matcher.find() & Matcher.group() by 'pattern'.
So, you want to know the difference between them?
Go for the matches() method if you want to match your pattern against the whole input string, and go for Matcher.find() followed by Matcher.group(), to find any number of substring matches in the input string.
I suggest you read more of these API usages in the javadoc.
And 1 more thing - when you have a lot of strings to be matched against a same regex pattern, it is advisable that you create a Pattern instance and use Matcher.matches() or Matcher.find()/Matcher.group() on it.
Using String's matches(regex) is relatively a more costly method, for a long list of strings to be matched against. For just few matches, you can use this.
...I understand that because of the use of ?:, we do not get the characters "." & " " as a mtching group in the result...
No. When designing a pattern, anything within '(' and ')' is called a capturing group, which once matched the regex engine shall remember throughout its processing. To prevent the regex engine remembering this match, as we do not intend to use it again else where in our pattern(as a back reference), we use '?:'. You can even remove it. Nothing is going to change, except for the performance when the input string is very large.