From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Albert Reiner Newsgroups: gmane.emacs.help Subject: how-many to number? Date: 28 Sep 2005 14:40:03 +0200 Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1127914431 21416 80.91.229.2 (28 Sep 2005 13:33:51 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 28 Sep 2005 13:33:51 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Sep 28 15:33:46 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EKc0u-0001NW-Pn for geh-help-gnu-emacs@m.gmane.org; Wed, 28 Sep 2005 15:30:24 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EKc0u-0008IV-7I for geh-help-gnu-emacs@m.gmane.org; Wed, 28 Sep 2005 09:30:24 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!uio.no!quimby.gnus.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 18 Original-NNTP-Posting-Host: berry.phys.ntnu.no Original-X-Trace: quimby.gnus.org 1127911203 29173 129.241.48.91 (28 Sep 2005 12:40:03 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: Wed, 28 Sep 2005 12:40:03 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 Original-Xref: shelby.stanford.edu gnu.emacs.help:134210 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:29781 Archived-At: Hi, I am sure there must be a simple way to get the number of occurrences of some regular expression in some region as a number. However, the only thing I could find was count-matches / how-many, but that only prints a message in the minibuffer. A trivial example: (how-many "\\b\\w+\\b" (point-min) (point-max)) returns a string like "88 occurrences", but how can I get at the integer 88 instead? I would then want to do some simple arithmetic on it. Thanks in advance, Albert.