match memes by leading or trailing words