Meta Interview Question

Implement a simple regex parser.