Fixing error in refactoring.

matcher.matches() only works if the entire string matches the pattern. 

Needed to use matcher.find() to locate a match within the string.