* replace and delete @ 2003-11-10 10:37 Herbert Fritsch 2003-11-10 15:57 ` Dan Anderson 2003-11-10 16:54 ` Kevin Rodgers 0 siblings, 2 replies; 4+ messages in thread From: Herbert Fritsch @ 2003-11-10 10:37 UTC (permalink / raw) First I want to delete empty lines. I don't get it. Second I want to replace/delete words in a line except the beginning of the line "ABC*:". Please help me. Herbert ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: replace and delete 2003-11-10 10:37 replace and delete Herbert Fritsch @ 2003-11-10 15:57 ` Dan Anderson 2003-11-10 16:54 ` Kevin Rodgers 1 sibling, 0 replies; 4+ messages in thread From: Dan Anderson @ 2003-11-10 15:57 UTC (permalink / raw) Cc: help-gnu-emacs Try M-% . It'll search and replace and ask you yes/no to delete it. -Dan On Mon, 2003-11-10 at 05:37, Herbert Fritsch wrote: > First I want to delete empty lines. I don't get it. > Second I want to replace/delete words in a line except the beginning of the > line "ABC*:". Please help me. > > Herbert > _______________________________________________ > Help-gnu-emacs mailing list > Help-gnu-emacs@gnu.org > http://mail.gnu.org/mailman/listinfo/help-gnu-emacs ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: replace and delete 2003-11-10 10:37 replace and delete Herbert Fritsch 2003-11-10 15:57 ` Dan Anderson @ 2003-11-10 16:54 ` Kevin Rodgers 2003-11-10 21:29 ` Herbert Fritsch 1 sibling, 1 reply; 4+ messages in thread From: Kevin Rodgers @ 2003-11-10 16:54 UTC (permalink / raw) Herbert Fritsch wrote: > First I want to delete empty lines. I don't get it. M-< M-x delete-matching-lines RET ^$RET > Second I want to replace/delete words in a line except the beginning of the > line "ABC*:". If "ABC*:" is literal text, and you want to delete all the text after it: M-x replace-regexp RET ^\(ABC\*:\).* RET \1 RET If it's a regular expression, just use * instead of \*. If you want to replace the text with something else, use \1 something_else instead of just \1. -- Kevin Rodgers ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: replace and delete 2003-11-10 16:54 ` Kevin Rodgers @ 2003-11-10 21:29 ` Herbert Fritsch 0 siblings, 0 replies; 4+ messages in thread From: Herbert Fritsch @ 2003-11-10 21:29 UTC (permalink / raw) Kevin Rodgers wrote: > If it's a regular expression, just use * use ".*"... But you helped me a lot. Thank you Kevin! ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-11-10 21:29 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2003-11-10 10:37 replace and delete Herbert Fritsch 2003-11-10 15:57 ` Dan Anderson 2003-11-10 16:54 ` Kevin Rodgers 2003-11-10 21:29 ` Herbert Fritsch
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).