URI settings confusion

I read the URI detection article but im confused on how to set it up because its a little complex for me.
I am trying to set up autofill for a domain “foo.com”. but it has several subdomains that require different logins.

foo.com, *.foo.com, *.foo.com/*, foo.com/*, bar.com, *.bar.com, *.bar.com/*, bar.com/*
requires the same login. (2 different domains, including subdomains)
xxx.foo.com requires a different login. (specific subdomain)

I tried using the “never” URI but it didnt work, at least the way I did it.
how do I set this up?

I think “exact” would be your best bet, but more experienced users may have better suggestions.