Google Interview Question

Write a substring text parser.