Bloomberg interview question

Implement a glob function.