${(M)…}
: Include matched portion of pattern matching
(M)
is only useful for parameter expansion operators ${.../...}
and ${(S)...#...}
.
It includes the matched portion in the result.
Links
BashSupport Pro is a Zsh IDE with support for ${(M)…} – try it now!