Alias - Difference between layer and sublayer on the command line

For an alias I need to exclude sublayers from a command.
for example:
I want to turn off layers xname1 and xname2
but I have some sublayers on other layers also starting with x which I want to keep on.

I seem to remember that this was done with [ ] and a ~ but I can’t remember the syntax… or was this in ACAD?

Any tips?
N