From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Loris Bennett" Newsgroups: gmane.emacs.help Subject: Re: How to get count of a specific character Date: Tue, 04 Feb 2014 15:49:35 +0100 Organization: Freie Universitaet Berlin Message-ID: <87lhxrnda8.fsf@hornfels.zedat.fu-berlin.de> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1391525416 11972 80.91.229.3 (4 Feb 2014 14:50:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 4 Feb 2014 14:50:16 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Feb 04 15:50:24 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WAhKO-0000aK-Ov for geh-help-gnu-emacs@m.gmane.org; Tue, 04 Feb 2014 15:50:20 +0100 Original-Received: from localhost ([::1]:52871 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WAhKO-0007MQ-Ek for geh-help-gnu-emacs@m.gmane.org; Tue, 04 Feb 2014 09:50:20 -0500 Original-Path: usenet.stanford.edu!fu-berlin.de!uni-berlin.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 25 Original-X-Trace: news.uni-berlin.de rRGhQpowLnSbuLUJzk2uew7RuEWZsvdMI3/TOyfJYXRhfj Cancel-Lock: sha1:q+cnAgxDnJISj3HKrI9NNucwuKE= User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) Original-Xref: usenet.stanford.edu gnu.emacs.help:203632 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:95902 Archived-At: Angus Comber writes: > I have a buffer which is a massive long line of names followed by > semi-colon. I want to get a list of the number of names I have. I > can highlight the region and use wc to get count of words and divide > by 2 to get a rough measure. > > But it would be an easy task if I could simply get a count of the > number of semi-colon characters? > > Does anyone know a way to get this? If you do M-x re-builder when you are in the buffer and then enter ";" as the regex, the number of matches will be displayed. Cheers, Loris -- This signature is currently under construction.