Yakov Lerner wrote:
On 9/14/06, Nikolaos A. Patsopoulos <[EMAIL PROTECTED]> wrote:
Yakov Lerner wrote:
> On 9/14/06, Nikolaos A. Patsopoulos <[EMAIL PROTECTED]> wrote:
>> Yakov Lerner wrote:
>> > On 9/14/06, Nikolaos A. Patsopoulos <[EMAIL PROTECTED]> wrote:
>> >> 2.Can I delete after a pattern search? Sth like this:
>> >>
>> >> :/^<html\_.{-}<body>: /-3d
>> >>
>> >> and how can I repeat this globally?
>> >
>> > :g/^<html\_.{-}<body>: /.-3d
>> >
>> > Yakov
>> >
>> >
>> I get an E16: invalid range error
>
> Yeah, this can happen if pattern is found
> in line number < 4. (Then .-3 results in <=0 which is invalid
> line number). Just insert 4 dummy empty lines
> at beginning of file to avoid this.
>
> Yakov
>
>
This means that the -3d counts from the beginning of the pattern?? In my
file The first occurrence of the patten expands from line 1 to line 82.

Yes, from the beginning of the pattern

Yakov


How can I force it to delete 3 lines from the end?

--
Nikolaos A. Patsopoulos, MD
Department of Hygiene and Epidemiology
University of Ioannina School of Medicine
University Campus
Ioannina 45110
Greece
Tel: (+30) 26510-97804
mobile: +30 6972882016
Fax: (+30) 26510-97867 (care of Nikolaos A. Patsopoulos)
e-mail: [EMAIL PROTECTED]

Reply via email to