Advanced expression for placement constraints while creating docker service

I am looking for some document on advanced expression for placement constraints… For example, I need to run the the service only on node ID A and B…

I tried regex like node.id == /(A|B)/ , but it does not work. Only simple expression like node.id == A is working. Any guidance on whether it supports regex or advanced expression