Stop when input contains match