Hola.
Mirá, esta solución la acabo de "crear" (entre comillas porque seguro ya existe) y no se si será la más eficiente del mundo, seguro hay otra mucho mas eficiente. Pero a mí me funcionó y en definitiva eso es lo que cuenta.
Uso un TEdit para el texto, vos usá lo que necesites amoldándolo al código.
Basta de preámbulos, te paso el código que hice:
Código Delphi
[-]
function EmpiezaHTTP(T:String; Indice:Integer):Boolean;
begin
Result:=False;
if (LowerCase(T[Indice])='h') then
if (LowerCase(T[Indice+1])='t') then
if (LowerCase(T[Indice+2])='t') then
if (LowerCase(T[Indice+3])='p') then
if (LowerCase(T[Indice+4])=':') then
if (LowerCase(T[Indice+5])='/') then
if (LowerCase(T[Indice+6])='/') then
Result:=True;
end;
procedure StrListToMemo(var Memo:TMemo; StrList:TStringList);
var
I:Integer;
begin
for I := 0 to StrList.Count - 1 do
Memo.Lines.Append(StrList.Strings[i]);
end;
procedure TForm1.Button1Click(Sender: TObject);
var
ListaURLs:TStringList; StrAuxiliar:String; I:Integer;
begin
ListaURLs:=TStringList.Create;
I:=1;
while (I<=Length(Edit1.Text)) do begin
StrAuxiliar:='';
if (EmpiezaHTTP(Edit1.Text,I)) then begin
CantMovimientos:=0;
while (Edit1.Text[i]<>' ') do begin StrAuxiliar:=StrAuxiliar+Edit1.Text[i];
I:=I+1;
end;
ListaURLs.Append(StrAuxiliar);
end;
I:=I+1;
end;
StrListToMemo(Memo1,ListaURLs);
end;
Y así como funciona:
Espero que te sea útil, que te de la solución que necesitás.
Si alguien tiene una mejor, o una función que haga esto mismo, que la escriba así yo también aprendo
Saludos!