[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: delete whitespace lines with replace-regexp
From: |
weber |
Subject: |
Re: delete whitespace lines with replace-regexp |
Date: |
Thu, 12 Jul 2007 12:49:53 -0000 |
User-agent: |
G2/1.0 |
On 12 jul, 03:53, "oliver" <oliver_baum...@nospam.justemail.net>
wrote:
> hello
>
> i want to use query-replace-regexp or replace-regexp to delete all lines
> contain only whitespace.
>
> so i tried the the command with the search regexp "^\s-*$^J" (with ^J as in
> ctrl-q ctrl-j) and an empty replacement. nothing gets replaced.
>
> what's wrong?
>
> thanks, olli
Well, it looks like you can't use '$' unless on the end of the regexp.
Anyway I tried with ^\s-*^J and it does what you want!
Sorry for the incomplete answer,
-weber