How to Group Links

I have a group of links wih pattern:
li.menu-department-1 li.menu__item:nth-of-type(n+2) a.menu__link
li.menu-department-2 li.menu__item:nth-of-type(n+2) a.menu__link
li.menu-department-3 li.menu__item:nth-of-type(n+2) a.menu__link
li.menu-department-4 li.menu__item:nth-of-type(n+2) a.menu__link
li.menu-department-5 li.menu__item:nth-of-type(n+2) a.menu__link
li.menu-department-6 li.menu__item:nth-of-type(n+2) a.menu__link

Is there a way I can group them into like below?
li.menu-department-* li.menu__item:nth-of-type(n+2) a.menu__link

Url: https://eshop.tesco.com.my/groceries/en-GB/

Sitemap:
{"_id":"tesco_1","startUrl":["https://eshop.tesco.com.my/groceries/en-GB/"],"selectors":[{"id":"category","type":"SelectorLink","parentSelectors":["_root"],"selector":"a.menu__link.menu__link--superdepartment","multiple":true,"delay":""},{"id":"subcategory","type":"SelectorLink","parentSelectors":["category"],"selector":"li.menu__item:nth-of-type(n+2) a.menu__link.menu__link--department","multiple":true,"delay":""},{"id":"subsubcategory","type":"SelectorLink","parentSelectors":["subcategory"],"selector":"li.menu-department-1 li.menu__item:nth-of-type(n+2) a.menu__link","multiple":true,"delay":""},{"id":"item","type":"SelectorElement","parentSelectors":["scroll"],"selector":"div.tile-content","multiple":true,"delay":""},{"id":"detailUrl","type":"SelectorLink","parentSelectors":["item"],"selector":"a.product-tile--title","multiple":false,"delay":""},{"id":"productname","type":"SelectorText","parentSelectors":["item"],"selector":"a.product-tile--title","multiple":false,"regex":"","delay":""},{"id":"thumbnail","type":"SelectorElementAttribute","parentSelectors":["item"],"selector":"img.product-image","multiple":true,"extractAttribute":"srcset","delay":""},{"id":"price","type":"SelectorText","parentSelectors":["item"],"selector":"div.price-per-sellable-unit span.value","multiple":false,"regex":"","delay":""},{"id":"pagination","type":"SelectorLink","parentSelectors":["subsubcategory","pagination"],"selector":"li.pagination-btn-holder:nth-of-type(n+2) a.pagination--button","multiple":true,"delay":""},{"id":"scroll","type":"SelectorElementScroll","parentSelectors":["subsubcategory","pagination"],"selector":"li.product-list--list-item","multiple":true,"delay":"1000"},{"id":"remark1","type":"SelectorText","parentSelectors":["item"],"selector":"div.product-details--content span.offer-text","multiple":false,"regex":"","delay":0},{"id":"remark2","type":"SelectorText","parentSelectors":["item"],"selector":"div.product-details--content span.dates","multiple":false,"regex":"","delay":0}]}

Hi!

Since you want to pick an elements with the same beginning (prefix) pattern, you can use next CSS selector:

CSS [attribute^=value] Selector

So using above mentioned method, your selector would look like:

li[class^=menu-department] a

More information regarding CSS selectors can be found on W3Schools page:
https://www.w3schools.com/cssref/css_selectors.asp

Hi Iconoclast,

Somehow the sitemap does not work. Actually the problem is the 3rd tier of category
I will spend sometime trying.
Thanks!