From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "sandro.dentella" Newsgroups: gmane.emacs.help Subject: Re: regexp match failure Date: 22 Nov 2006 10:50:07 -0800 Organization: http://groups.google.com Message-ID: <1164221407.521343.172240@m73g2000cwd.googlegroups.com> References: <1164206793.546304.289140@m7g2000cwm.googlegroups.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: sea.gmane.org 1164224449 17719 80.91.229.2 (22 Nov 2006 19:40:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 22 Nov 2006 19:40:49 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Nov 22 20:40:45 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GmxxH-0000vd-1W for geh-help-gnu-emacs@m.gmane.org; Wed, 22 Nov 2006 20:40:23 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GmxxG-0008Bs-H2 for geh-help-gnu-emacs@m.gmane.org; Wed, 22 Nov 2006 14:40:22 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!m73g2000cwd.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 19 Original-NNTP-Posting-Host: 151.38.130.161 Original-X-Trace: posting.google.com 1164221413 18183 127.0.0.1 (22 Nov 2006 18:50:13 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Wed, 22 Nov 2006 18:50:13 +0000 (UTC) In-Reply-To: User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20051007 Galeon/2.0.0 (Debian package 2.0.0-2),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: m73g2000cwd.googlegroups.com; posting-host=151.38.130.161; posting-account=5pj8_A0AAAAcvY3f2Jf9G78aXC6jAaZG Original-Xref: shelby.stanford.edu gnu.emacs.help:143286 Original-To: help-gnu-emacs@gnu.org 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:38903 Archived-At: > `\S' is not a valid regexp, it needs a following syntax code. And since > you apparently want to match characters which *are* letters rather than > those which are *not*, `\s' is the appropriate construct with the `w' > code: "^\\sw+:" ok, thanks for pointing this out, I'm just too used to perl/python regexp that I passed over it > Inside of the `[...]' construct, backslash constructs are not special > (RTFM). But in Emacs 22 you can do this: "^[[:alnum:]]+:" I ended up using \\S-+ to catch also the '-' char. Thanks again sandro *:-)