Ver Mensaje Individual
  #5  
Antiguo 09-04-2007
Avatar de roman
roman roman is offline
Moderador
 
Registrado: may 2003
Ubicación: Ciudad de México
Posts: 20.269
Reputación: 10
roman Es un diamante en brutoroman Es un diamante en brutoroman Es un diamante en bruto
Pues ¿cómo quitas la primera parte? Porque el método que describiste al principio del hilo no funciona si hay algo antes del primer ".

Yo haría algo así:

Código Delphi [-]
var
  i: Integer;

begin
  (* Busco la primera " *)
  i := Pos('"', Texto);
  if i > 0 then
  begin
    Delete(Texto, 1, i); // borro todo hasta la primera "

    (* Busco la segunda " *)
    i := Pos("", Texto);
    if i > 0 then
    begin
      Delete(Texto, i, MaxInt); // borro hasta el final (tomado de seoane )
    end;
  end;
end;

// Saludos
Responder Con Cita