J.P. Morgan interview question

Q 1. Find a given pattern in a string.