[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [VI] Fjernelse af efterfølgende whitespaces?



On Thu, 27 Feb 2003, Jesper Krogh wrote:

> Jeg troede egentligt at man kunne lave regex-search-and-replace med
> vi's:
> 
> :1,$s/regex//g

range'en 1,$ angiver kun een linie, hvis du vil søge og erstatte i hele 
filen kan du bruge %:

  :%s/søg/erstat/g

Iøvrigt gør et c efter g'et som i:

  :%s/søg/erstat/gc

søgning/erstatningen interaktiv.

> Jeg har en fil med:
> 
> lidt tekst ( her kommer så 180 spaces som jeg gerne vil have væk )
> 
> hvilket jeg troede jeg kunne gøre med:
> :1,$s/\s*$//g

prøv:

  :s/\s\+$//

på een linie, eller:

  :%s/\s\+$//g

for at gøre det på alle linier.

Anders





 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 18:44 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *