From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: nunojsilva@invalid.invalid (Nuno J. Silva) Newsgroups: gmane.emacs.help Subject: Re: regular expression Date: Tue, 26 Jan 2010 19:46:21 +0000 Organization: Datemas.de http://news.datemas.de Message-ID: <87fx5s4pki.fsf@monolith.local.lan> References: <7s5bu9Fg2iU1@mid.individual.net> <87pr4y1hxl.fsf@monolith.local.lan> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1264538498 8330 80.91.229.12 (26 Jan 2010 20:41:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 26 Jan 2010 20:41:38 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jan 26 21:41:30 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NZsDn-0006TP-Ta for geh-help-gnu-emacs@m.gmane.org; Tue, 26 Jan 2010 21:41:12 +0100 Original-Received: from localhost ([127.0.0.1]:53786 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NZsDp-0003hx-AA for geh-help-gnu-emacs@m.gmane.org; Tue, 26 Jan 2010 15:41:13 -0500 Original-Path: news.stanford.edu!usenet.stanford.edu!goblin3!goblin1!goblin.stu.neva.ru!newsfeed.datemas.de!news.datemas.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 27 Original-X-Trace: news.datemas.de 7HTKXy4ngKZYVKSVdlcT0cfIjJiI/kKfrFadFCLOatvr7jFd2R3g5MsHB0EzAq6v5TwCOGsLD1rrCQ/f4qCPcpIf2Mi55Pd3A8j5KyDNjYXl903A56SYKFvsFSX5bBZ+pZrkwsQUzqucDWR+IDp05GP+l0ojrdRgQFQrM0x+SXQqitfAZ3HLIg== Original-X-Complaints-To: abuse@datemas.de Original-NNTP-Posting-Date: Tue, 26 Jan 2010 19:40:30 +0000 (UTC) Cancel-Lock: sha1:QU3Hj+f9DZ/nvedmvx83WLCRwoQ= User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Original-Xref: news.stanford.edu gnu.emacs.help:176421 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:71493 Archived-At: Helmut Eller writes: > * Nuno J. Silva [2010-01-25 13:35+0100] writes: > >> The second one works here. It has the result of hitting C-q C-j, instead >> of \n, because there are other places where emacs won't match a newline >> with \n, and needs this. > > Have you tried to include \r in the regexp? I don't know if parens are the right way to make strings in regexps, but none of the following worked (in the place where \n was): \n\r (\n\r) (\r\n) The last one looks silly, I wonder if any system uses such a line break. The first one would catch any of the characters. As this is UNIX I doubt there are carriage returns on my files (but emacs could use its own internal convention for line breaks). -- Nuno J. Silva gopher://sdf-eu.org/1/users/njsg