From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: harven Newsgroups: gmane.emacs.help Subject: Re: regexp/emacs selective replace Date: Wed, 25 Nov 2009 13:36:43 +0100 Organization: http://groups.google.com Message-ID: <87ws1ewzl0.fsf@ergodik.univ-brest.fr> References: <26478209.post@talk.nabble.com> <87skc3kokg.fsf@ergodik.univ-brest.fr> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1259153088 20842 80.91.229.12 (25 Nov 2009 12:44:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 25 Nov 2009 12:44:48 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Nov 25 13:44:41 2009 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 1NDHEe-0005KF-7r for geh-help-gnu-emacs@m.gmane.org; Wed, 25 Nov 2009 13:44:40 +0100 Original-Received: from localhost ([127.0.0.1]:42788 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NDHEd-0002LA-Uq for geh-help-gnu-emacs@m.gmane.org; Wed, 25 Nov 2009 07:44:39 -0500 Original-Path: news.stanford.edu!usenet.stanford.edu!goblin2!goblin.stu.neva.ru!feeder.erje.net!newsfeed.straub-nv.de!proxad.net!feeder1-2.proxad.net!u-picardie.fr!utc.fr!news.univ-lille1.fr!crihan.fr!news.univ-brest.fr!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 13 Original-NNTP-Posting-Host: mathw171.univ-brest.fr Original-X-Trace: news.univ-brest.fr 1259152724 7022 172.19.130.171 (25 Nov 2009 12:38:44 GMT) Original-X-Complaints-To: usenet@news.univ-brest.fr Original-NNTP-Posting-Date: 25 Nov 2009 12:38:44 GMT User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:Guo2PwO6M3y3jo7gurTHp/cidUo= Original-Xref: news.stanford.edu gnu.emacs.help:175045 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:70118 Archived-At: Joost Kremers writes: > note that {[^}]*} could also have been written as {.*?} (which IHMO is a bit > clearer and easier to read). strictly speaking {[^}]*} is not the same as {.*?} The first will match {xxx } because emacs regexp [^...] matches newline if it is not included in the brackets. By the way {.*?} is probably closer to what the OP asks for.