Você precisa remover as citações na correspondência de expressão regular.
if [[ ${str} =~ m\.m ]]; then
Na página do bash man:
[...] An additional binary operator, =~, is available, with the same precedence as == and !=. When it is used, the string to the right of the operator is considered an extended regular expres‐ sion and matched accordingly (as in regex(3)). The return value is 0 if the string matches the pattern, and 1 otherwise. If the regular expression is syntactically incorrect, the conditional expression's return value is 2. If the shell option nocasematch is enabled, the match is performed without regard to the case of alphabetic characters. Any part of the pattern may be quoted to force it to be matched as a string.
Assim, com as aspas, você está usando correspondência de seqüência de caracteres antiga.
Se você precisar de espaços no padrão, apenas os escape:
str="m m"
if [[ ${str} =~ m\ +m ]]; then