Category elements within a pattern