Select elements by testing each of an element's classes for `pattern`.