also wenn um jede zeile auslesen zu können machste einfach so:
Delphi-Quellcode:
function SeekInFile(sFile: string; sString: string): string;
var
f: File;
s: string;
found: boolean;
begin
found := false;
assignfile(f,sFile);
Reset(f);
while not EOF(f) do begin
readln(f,s);
if SuperMatch(s,'*@{'+sString+'}@*') then
found := true;
else
found := false;
end;
closefile(f);
if found then
ShowMessage('Found')
else
ShowMessage('Your Searchstring was not found :P');
end;
Zum aufrufen:
SeekInFile('C:\Bla.txt','Delphi-Praxis');
MfG Powerstreamer
P.S.:
Supermatch is aus der SuperMsk.pas (found @
www.torry.net)