There are no dots in DNS packets. Instead, there’s always byte with value of length of next part of name, e.g.:
\x04test
\x05local
\x03www\x08mikrotik\x03com
Especially for short names, you also want to append .\x01 to help with false positives:
\x04test.\x01
RouterOS skips null bytes, so “.” is for any record type, except for few uncommon ones with codes > 255, and \x01 is for query class, which is 1 for all usual uses.