I have this code that opens a text file and reads every line and looks for $ symbol
then it reads bacwards until it finds a space and foreward the same way, and copys the string in between the spaces how can i change it to read backwards until it finds @ and foreward until it finds a @ symbol?
is this the right way, or do i need to use blockread ?
r : TextFile;
F : TextFile;
S : STRING;
i : integer;
I := Pos('$',S);
if I > 0 then begin
while (I > 0) and (S[I] <> '@ ') do Dec(I);
S := Copy(S,I + 1,Length(S) - I);
I := Pos('@ ',S + '@ ');
A := Copy(S,1,I - 1);
// S := Copy(S,I,Length(S) - I + 1);