Mapping domains and subdomains

HA v. 2.4.12

Frontend:
use_backend %[hdr(host),lower,map_dom(/etc/haproxy/Maps/domains.map)]

domains.map:

domain.com srv
sub1.domain.com srv1
sub2.domain.com srv3

Now, calling anysub.domain.com only matches the first occurrence of map ‘domain.com
What would be the right syntax for an exact match? map_beg, map_end or map_str ?

Also wonder, whether can point to multiple map files (due to better organization) at same front end?