Ver Mensaje Individual
  #4 (permalink)  
Antiguo 11/04/2017, 10:59
rez3t45
 
Fecha de Ingreso: septiembre-2008
Mensajes: 7
Antigüedad: 15 años, 8 meses
Puntos: 0
Respuesta: Eliminar Linea de Texto Vacio

Gracias. Efectivamente sus respuestas son correctas pero creo que no me explique bien al formular mi pregunta, lo que necesitaba era eliminar las lineas vacías.
Lo cual logre con javascript :

Código:
var valor = $(this).val();
                   
var text = valor;
text = text.replace(/\r/gi,'');
text = text.split('\n');
count1 = text.length;
                   
for(x=0;x<count1;x++){
      if(text[x].match(/[\S]/g) == null) text[x] = ''; else text[x] = text[x];}
                 
text = text.join('\n').replace(/\n{2,}/g,'\n');
count2 = text.split('\n').length;
valor= text;
El codigo lo copie luego de estudiar la pagina siguiente :

http://www.texto.kom.gt/removerlineasenblanco.htm

De igual manera muchas gracias por sus aportes