How do I specify 0 or 1 occurrences of an element in a uBlock Origin filter?

Let’s say I have two cosmetic filter rules for uBlock Origin that are identical, except one has an extra <div> element in the path. The extra <div> element may or may not be present depending on whether the page is viewed on mobile or desktop.

For example:

www.example.com##div.listitem > div.item
www.example.com##div.listitem > div > div.item

I’d like to combine these into a single rule where the <div> element is optional, similar how the ? operator works in regex.

Is there a way to specify “zero or one” occurrences of an element in a uBlock Origin cosmetic filter?