Fix wildcard handling in get_hostmask_regex