Bloomberg Interview Question

Regular expression matching