J.P. Morgan Interview Question

Q 1. Find a given pattern in a string.