From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Raffaele Ricciardi Newsgroups: gmane.emacs.bugs Subject: bug#10649: 23.4; Regexp char classes not working Date: Tue, 31 Jan 2012 20:47:52 +0000 Message-ID: <4F285378.60102@gmail.com> References: <4F2627B5.2020300@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1328042821 3805 80.91.229.3 (31 Jan 2012 20:47:01 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 31 Jan 2012 20:47:01 +0000 (UTC) Cc: 10649@debbugs.gnu.org To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jan 31 21:47:00 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RsKbT-0002im-0A for geb-bug-gnu-emacs@m.gmane.org; Tue, 31 Jan 2012 21:46:59 +0100 Original-Received: from localhost ([::1]:44679 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RsKbS-0000Y1-Hs for geb-bug-gnu-emacs@m.gmane.org; Tue, 31 Jan 2012 15:46:58 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:49811) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RsKbK-0000XP-Vc for bug-gnu-emacs@gnu.org; Tue, 31 Jan 2012 15:46:56 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RsKbF-0003ln-BJ for bug-gnu-emacs@gnu.org; Tue, 31 Jan 2012 15:46:50 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44033) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RsKbF-0003lj-7Q for bug-gnu-emacs@gnu.org; Tue, 31 Jan 2012 15:46:45 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1RsKbV-0004jf-U4 for bug-gnu-emacs@gnu.org; Tue, 31 Jan 2012 15:47:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Raffaele Ricciardi Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 31 Jan 2012 20:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10649 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 10649-submit@debbugs.gnu.org id=B10649.132804277118143 (code B ref 10649); Tue, 31 Jan 2012 20:47:01 +0000 Original-Received: (at 10649) by debbugs.gnu.org; 31 Jan 2012 20:46:11 +0000 Original-Received: from localhost ([127.0.0.1]:47656 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RsKag-0004iZ-No for submit@debbugs.gnu.org; Tue, 31 Jan 2012 15:46:10 -0500 Original-Received: from mail-ww0-f46.google.com ([74.125.82.46]:47518) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RsKae-0004iK-CD for 10649@debbugs.gnu.org; Tue, 31 Jan 2012 15:46:09 -0500 Original-Received: by wgbdt14 with SMTP id dt14so459197wgb.15 for <10649@debbugs.gnu.org>; Tue, 31 Jan 2012 12:45:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=tmuavKmI8mIyYM3g1NSID5Ls6Gxl2kvAzimS3xUjYYA=; b=q++ZGK+bsrnz/FYQ77SALUuAIwm3h1KLdqY7JcPxw+UQm4KvgwbRzxkzbXJQZAi0rc GgVRlxSK593y0/Gy4IBLQBP/FhbE2rlmfwg2zxIhAdpR5fjChJ/1F46YZLThEhyyLBqf RTrpag8ZmNiOJRtph3jBN5rZsXbJTDw0aVheg= Original-Received: by 10.180.78.98 with SMTP id a2mr6337626wix.17.1328042745466; Tue, 31 Jan 2012 12:45:45 -0800 (PST) Original-Received: from [101.10.252.12] (5ac63346.bb.sky.com. [90.198.51.70]) by mx.google.com with ESMTPS id ho4sm39889252wib.3.2012.01.31.12.45.42 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 31 Jan 2012 12:45:43 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:56325 Archived-At: Ouch! I did RTFM, but the brackets confused me. Thank you. -- On 01/30/2012 08:06 AM, Glenn Morris wrote: > Raffaele Ricciardi wrote: > >> - start emacs -Q >> - evaluate this forms: >> (string-match "[:xdigit:]" "0") >> (string-match "[:xdigit:]" "a") >> (string-match "[:alnum:]" "5") >> They should return non-nil, but they return nil instead. > > From the elisp manual: > > 34.3.1.2 Character Classes > > Here is a table of the classes you can use in a character alternative, > ^^^^^^^^^^^^^^^^^^^^^^^^^ > > 34.3.1.1 Special Characters in Regular Expressions > [...] > `[ ... ]' > is a "character alternative", which begins with `[' and is > terminated by `]' > > Therefore you must write eg > > (string-match "[[:xdigit:]]" "0")