From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Leo Newsgroups: gmane.emacs.help Subject: Re: Negate a regexp Date: Mon, 19 Apr 2010 19:35:58 +0100 Organization: University of Cambridge Message-ID: References: <8282B0BC46B0423AA171693F27FF1D22@us.oracle.com> <877ho3tjix.fsf@tux.homenetwork> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1271702207 25471 80.91.229.12 (19 Apr 2010 18:36:47 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 19 Apr 2010 18:36:47 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Apr 19 20:36:46 2010 connect(): No such file or directory 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.69) (envelope-from ) id 1O3vps-000131-VF for geh-help-gnu-emacs@m.gmane.org; Mon, 19 Apr 2010 20:36:45 +0200 Original-Received: from localhost ([127.0.0.1]:50611 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O3vps-0004da-5z for geh-help-gnu-emacs@m.gmane.org; Mon, 19 Apr 2010 14:36:44 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O3vpO-0004cv-Kr for help-gnu-emacs@gnu.org; Mon, 19 Apr 2010 14:36:14 -0400 Original-Received: from [140.186.70.92] (port=41901 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O3vpN-0004cc-6S for help-gnu-emacs@gnu.org; Mon, 19 Apr 2010 14:36:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O3vpJ-0004NW-Ve for help-gnu-emacs@gnu.org; Mon, 19 Apr 2010 14:36:11 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:44357) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3vpJ-0004Mj-Pi for help-gnu-emacs@gnu.org; Mon, 19 Apr 2010 14:36:09 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1O3vpH-0000UQ-3u for help-gnu-emacs@gnu.org; Mon, 19 Apr 2010 20:36:07 +0200 Original-Received: from smaug.linux.pwf.cam.ac.uk ([193.60.95.72]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 19 Apr 2010 20:36:07 +0200 Original-Received: from sdl.web by smaug.linux.pwf.cam.ac.uk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 19 Apr 2010 20:36:07 +0200 X-Injected-Via-Gmane: http://gmane.org/ connect(): No such file or directory Original-Lines: 13 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: smaug.linux.pwf.cam.ac.uk User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:Jv2esUS2mumbcKoyxgOrcRVdBW4= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:72760 Archived-At: On 2010-04-19 18:54 +0100, Thierry Volpiatto wrote: > It will return \\coor because \ have to be escaped. > > (save-excursion (when (looking-back "^\\(\\\\[a-z]*\\)") (match-string 0))) > > It match on 1 also. This is a special case for the special example in my previous post. What about co\or ? It is still text contains word or symbol or \ (i.e. \sw \s_ or \s\). Leo