Path: utzoo!mnetor!uunet!mcvax!ukc!eagle!arc1 From: arc1@eagle.ukc.ac.uk (A.R.Curtis) Newsgroups: comp.emacs Subject: Re: A regexp for blank lines Message-ID: <4623@eagle.ukc.ac.uk> Date: 10 Mar 88 10:21:43 GMT References: <8803091028.AA17077@ucbvax.Berkeley.EDU> Reply-To: arc1@ukc.ac.uk (A.R.Curtis) Organization: Computing Lab, University of Kent at Canterbury, UK. Lines: 24 Summary: Expires: Sender: Followup-To: In article <8803091028.AA17077@ucbvax.Berkeley.EDU> jthomas@nmsu.CSNET writes: > >I am trying to write elisp code to remove lines from a buffer. My intent >... >. I thought I might try to let this eliminate blank lines by trying "^$" Well, there are at least two alternatives. If you want to stick with the idea of using regexps then there is a function called delete-matching-lines which is probably what you want. A specific way of doing what you want with blank lines is to remove all occurrences of the string ^J^J (i.e. a blank line consists of the string newline-newline) Tony -- Tony Curtis, Computing Lab. | arc1@uk.ac.ukc Univ. Kent at Canterbury | Canterbury, Kent CT2 7NF | tcu@uk.ac.ex.cs