Uh, if you want a wildmatch for this kind of "duration in textstring", I suppose a regex is most suitable -at last-.
I'm not that firm with regex, - atm it will match only if m AND w AND d are provided... I have probs to handle the spaces... but for sure someone that reads this can improve my poor attempt smile
Also note, that whatever regex/other method used, it inevitable will match statements like "Hey, I bought a new 3d game!
Code:
on *:text:*:#: {
  noop $regex($1-,/((?:\d+m)? (?:[1-3]w)? (?:[1-6]d)?)/S)
  if ($regml(1)) { echo -a match: $regml(1) }
}