adding glob-to-regex function.