help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: delete the first few chars of each line


From: Pascal Bourguignon
Subject: Re: delete the first few chars of each line
Date: 22 Sep 2003 22:08:17 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) 21.3.50.pjb1.1

Zimmen Gnauh <yah00204052@yahoo.com> writes:

>   To delete the first 10 chars of a line. Is there any simpler way
> than the following:
> 
> (let beg (progn (beginning-of-line) (point))
>         (delete-region beg 10))
 
C-h f let RET

(while (re-search-forward "^.........." nil t) 
    (delete-region (match-beginning 0) (match-end 0)))

or if you don't need it in a script:

M-x replace-regexp RET ^.......... RET RET


-- 
__Pascal_Bourguignon__
http://www.informatimago.com/
Do not adjust your mind, there is a fault in reality.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]