all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Albert Reiner <areiner@tph.tuwien.ac.at>
Subject: how-many to number?
Date: 28 Sep 2005 14:40:03 +0200	[thread overview]
Message-ID: <vw8psqtv00s.fsf@berry.phys.ntnu.no> (raw)

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.

             reply	other threads:[~2005-09-28 12:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-28 12:40 Albert Reiner [this message]
2005-09-28 13:35 ` how-many to number? rgb
2005-09-28 14:00   ` Albert Reiner
2005-09-29  3:15     ` Neon Absentius
     [not found]     ` <mailman.9034.1127965324.20277.help-gnu-emacs@gnu.org>
2005-09-29 13:17       ` Albert Reiner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=vw8psqtv00s.fsf@berry.phys.ntnu.no \
    --to=areiner@tph.tuwien.ac.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.