[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
silly regexp-replace question: how to delete empty lines
From: |
leo |
Subject: |
silly regexp-replace question: how to delete empty lines |
Date: |
Wed, 3 Mar 2004 12:11:08 +1100 |
hi there
in a buffer like
text is here
and here and
here
further text is here
an the endtext
i want to delete the two empty lines by an regexp-replace.
so i started with _finding_ the lines. that's easy: "^$" is the regexp. but
obviouly (replace-regexp "^$" "ghdfg" nil nil nil) does nothing.;-)
SO in order to delete empty lines (i.e. to replace it with "") i have to
find the empty line _plus_ the linefeed.
so i tried (replace-regexp "^$
" "ghdfg" nil nil nil) where the linefeed was type as C-q C-j. but it
doesn't find anything.
any idea?
thanks, leo