match longest words for mcmatch