Amazon Interview Question

I was asked to write a regex pattern to find certain strings and then to solve a problem with coordinates.