search for a string in a given input