Xref: utzoo gnu.emacs.help:2179 comp.emacs:10786 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!tut.cis.ohio-state.edu!unreplyable!garbage From: S.Clayman@CS.UCL.AC.UK Newsgroups: gnu.emacs.help,comp.emacs Subject: Re: Newlines in regexps Message-ID: <9105291418.AA29772@aeneas.MIT.EDU> Date: 29 May 91 13:47:36 GMT References: Sender: daemon@tut.cis.ohio-state.edu Followup-To: gnu.emacs.help Distribution: world Organization: Gatewayed from the GNU Project mailing list help-gnu-emacs@prep.ai.mit.edu Lines: 21 Gabriel writes: >> >> I guess what I am really asking is: is there an easy way to put newlines >> in regexps? >> >> No, and this is a problem. I've always thought that emacs regexps >> should have a special character that matches ALL chacters, including >> newlines. Not having this makes writing certain regexps cumbersome. The answer is YES. Try re-searching for [a-z]^Q^J[a-z] This will find every line that ends in an alpha char followed by a line that starts with a alpha char. I suppose the secret is to treat the newline as the ^J character not some special regexp end-of-line. I use this regularly. Stuart