procedure TForm2.Button1Click(Sender: TObject);
var s:string;
i,count:integer;
begin
s:=edit1.Text;
count:=0;
for i:=1 to length(S) do
if Pos('111111', Edit1.Text) <> 0 then
label2.caption:='Yes: 111111!'
else
label2.caption:='No: 111111!';
end;
someone will be upshot use "while" OR "repeat..until"