Ver Mensaje Individual
  #7  
Antiguo 21-10-2005
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
Código Delphi [-]
var
  S: String;

begin
  S := '12.345.126-K';

  Delete(S, 3, 1);
  Delete(S, 6, 1);
  Delete(S, 9, 2);

  if StrToIntDef(S, -1) = -1 then
    ShowMessage('Formato incorrecto')
  else
    ShowMessage(S);
end;

// Saludos
Responder Con Cita