Select elements by testing each value of each element's attribute `attr` for `pattern`.