Title: Extracting Email Addresses
Question: is there a way to extract email addresses from HTML files, text documents ??
Answer:
function IsEMail(EMail: String): Boolean;
var
s: String;
ETpos: Integer;
begin
ETpos:= pos('@', EMail);
if ETpos 1 then
begin
s:= copy(EMail,ETpos+1,Length(EMail));
if (pos('.', s) 1) and (pos('.', s) Result:= true else Result:= false;
end
else
Result:= false;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
if isemail(Edit1.Text) then
begin
ShowMessage('eMail-Adresse!');
end;
end;