this is my program but it is not flexible ,
for example if i enter [email protected]

the ouput is ermina .

can anyone help me ?

program domainame(input,output);
var S:string;
begin
writeln('please tell me your email adress ');
readln(S);
S:=copy(S,1,6);
write('your domain name is ',S);
readln;
end.