Ver Mensaje Individual
  #1  
Antiguo 10-04-2007
francisco260184 francisco260184 is offline
Registrado
 
Registrado: abr 2007
Posts: 8
Reputación: 0
francisco260184 Va por buen camino
Exclamation Comparar cadenas de un txt

Hola, bueno ahora tengo otro problemilla .
Lo que intento hacer es comparar cadenasd de texto desde un archivo *.txt.
Por ejemplo, supongamos que tengo esto en un archivo txt:

M 2125 2 525.00 000 0.00
M 2125 2 109.12 000 0.00
M 2126 2 3900.00 000 0.00
M 2126 1 3900.00 000 0.00
M 2127 2 xxxx.xxx 000 0.00

Lo que intento hacer es comparar la segunda columna (2125,2125,2126,...).
para insertar una linea despues de que se termine una secuencia. Por ejemplo:

M 2125 2 525.00 000 0.00
M 2125 2 109.12 000 0.00
--------------AQUI QUIERO INSERTAR UNA LINEA--------------
M 2126 2 3900.00 000 0.00
M 2126 2 3900.00 000 0.00
M 2126 1 3900.00 000 0.00
--------------AQUI QUIERO INSERTAR UNA LINEA--------------
M 2127 2 xxxx.xxx 000 0.00
y asi sucesivamente,,, ..

GRACIAS:::
Responder Con Cita