remove unmatched patterns