From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Gregory Benjamin Newsgroups: gmane.emacs.help Subject: Help with regex including newline Date: Wed, 28 Mar 2012 15:03:13 -0700 Message-ID: <20120328220313.GA1859@dbn66.laserlab.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1332982422 10025 80.91.229.3 (29 Mar 2012 00:53:42 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 29 Mar 2012 00:53:42 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Mar 29 02:53:42 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SD3cT-0002X0-TQ for geh-help-gnu-emacs@m.gmane.org; Thu, 29 Mar 2012 02:53:42 +0200 Original-Received: from localhost ([::1]:56375 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SD3cT-0001lj-AW for geh-help-gnu-emacs@m.gmane.org; Wed, 28 Mar 2012 20:53:41 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:34488) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SD2bb-00058U-ML for help-gnu-emacs@gnu.org; Wed, 28 Mar 2012 19:48:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SD0xX-0002Yc-OR for help-gnu-emacs@gnu.org; Wed, 28 Mar 2012 18:03:17 -0400 Original-Received: from mail.laserlab.com ([69.229.78.89]:45564 helo=dbn66.laserlab.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SD0xX-0002Xk-Hm for help-gnu-emacs@gnu.org; Wed, 28 Mar 2012 18:03:15 -0400 Original-Received: by dbn66.laserlab.com (Postfix, from userid 1001) id 48A8320E1A2; Wed, 28 Mar 2012 15:03:13 -0700 (PDT) Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 69.229.78.89 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:84194 Archived-At: I've been struggling with this for more than an hour... I'm using GNU Emacs 24.0.93.2 Given the following text in a buffer: I wish to use M-x replace-regexp to delete the entire pattern, including the opening '<' and closing '>'. Using M-x re-builder, I came up with the following regexp: Note that the '^j' is actually entered by typing 'C-q C-j'. This regular expression highlights the text correctly in re-builder, but when I attempt to use it with M-x replace-regexp, it doesn't match anything. I've tried a number of variations to no avail. The intent of the regular expression is: "Match , but don't match past the > char." This last bit is controlled by using non-greedy matching *? instead of the usual *. Best, Greg