substring meme to query