It's a function.
I made it so it looks at a string(made it to look at web page source codes), and it gets all items that appear between a certain 2 strings or something.
Meaning
if I have a page like this
[T]A[/T]
[T]B[/T]
[T]C[/T]
[T]D[/T]
[T]E[/T]
[T]F[/T]
[T]G[/T]
I can make it store in a TStringArray each varible/text that is between [T] and [/T], or whatever I specify.
All the comments in this script were for my own use, so don't worry if you don't understand them. Good luck understanding the script as it is. There's also a ton of unused variables in the top that I used when putting the scripts basic function together.
The function does work.
function GetAllBetween(OS,f1,f2:String):TStringArray;
var
x,y,z,FirstP,FileN,FileLength:integer;
s,FIS,f3,NS:String;
TS2:TStringArray;
begin
NS:=OS
//-----------------
f3:=Between(f1,f2,NS)//Gets Whatever is inbetween
while Length(f3) > 0 do
begin
Y:=Y+1
f3:=Between(f1,f2,NS)//Gets Whatever is inbetween
NS:=replace(NS,f1+f3+f2,'')//Removes whatever was inbetween
f3:=Between(f1,f2,NS)//Gets Whatever is inbetween
end;
//-----------------
//-----------------
NS:=OS
//writeln(Y)
SetArrayLength(TS2,Y)
f3:=Between(f1,f2,NS)//Gets Whatever is inbetween
//writeln(f2)
for z:=0 to high(TS2) do
begin
TS2[Z]:=f3
f3:=Between(f1,f2,NS)//Gets Whatever is inbetween
NS:=replace(NS,f1+f3+f2,'')//Removes whatever was inbetween
f3:=Between(f1,f2,NS)//Gets Whatever is inbetween
end;
//-----------------
result:=TS2;
end;