help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how-many to number?


From: Albert Reiner
Subject: how-many to number?
Date: 28 Sep 2005 14:40:03 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

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 via email to

[Prev in Thread] Current Thread [Next in Thread]