Page 1 of 1

Deleting lines

Posted: Sat Apr 05, 2008 10:49 pm
by jpg
I want to delete all line exept the ones that begins with ç .

Example

Original text:

El lapso que, según la regla anterior, debiera cumplirse en un día de que carezca el mes, se entenderá vencido el último de ese mes.
çLos lapsos de días u horas se contarán desde el día u hora siguiente a los en que se ha verificado el acto que da lugar al lapso.
Los días se entenderán de veinticuatro horas, los cuales terminarán a las çen las obligaciones y demás actos, cuando las partes que en ellos


Edited text

çLos lapsos de días u horas se contarán desde el día u hora siguiente a
çen las obligaciones y demás actos, cuando las partes que en ellos


I need to conserve all the lines beginig with ç

THANKS

Posted: Sun Apr 06, 2008 4:29 am
by Bob Hansen
Can you provide a better explanation of a "line"?

The sample of desired result does not appear to include the full "line" in the first instance. And the second instance seems to begin in the middle of a "line" What defines the beginning and and of a line?

Or do you want the first n characters that follow the "ç" ?
Or do you want from "ç" to the end of a sentence? Does a sentence always end with "." ?

Can you make sure the before and after samples show actual "line" ends properly if the browser window is narrowed or made wider.

Posted: Sun Apr 06, 2008 9:59 pm
by ben_josephs
Indeed.

If the original text were actually

Code: Select all

El lapso que, según la regla anterior, debiera cumplirse en un día de que 
carezca el mes, se entenderá vencido el último de ese mes.
çLos lapsos de días u horas se contarán desde el día u hora siguiente a 
los en que se ha verificado el acto que da lugar al lapso.
Los días se entenderán de veinticuatro horas, los cuales terminarán a las 
çen las obligaciones y demás actos, cuando las partes que en ellos 
then
Find what: ^[^ç].*\n
Replace with: [nothing]

[X] Regular expression

Replace All
would produce the output you describe.