HSBC interview question

Code for Pattern matching and file reading and mapping.