Pregunta de entrevista de Google

Compare patterns in 2 strings and return true or false based on the pattern