From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Angus Comber Newsgroups: gmane.emacs.help Subject: Re: How to get count of a specific character Date: Tue, 4 Feb 2014 07:28:51 -0800 (PST) Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1391527811 12395 80.91.229.3 (4 Feb 2014 15:30:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 4 Feb 2014 15:30:11 +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 16:30:19 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 1WAhx4-000501-J9 for geh-help-gnu-emacs@m.gmane.org; Tue, 04 Feb 2014 16:30:18 +0100 Original-Received: from localhost ([::1]:52974 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WAhx3-0001Pq-D5 for geh-help-gnu-emacs@m.gmane.org; Tue, 04 Feb 2014 10:30:17 -0500 X-Received: by 10.52.179.138 with SMTP id dg10mr12458487vdc.2.1391527732681; Tue, 04 Feb 2014 07:28:52 -0800 (PST) X-Received: by 10.50.87.101 with SMTP id w5mr306689igz.0.1391527732418; Tue, 04 Feb 2014 07:28:52 -0800 (PST) Original-Path: usenet.stanford.edu!f11no12347390qae.1!news-out.google.com!vg8ni11igb.0!nntp.google.com!uq10no9299629igb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=195.200.76.252; posting-account=SYwseQoAAABBYGT-AD1YXrcTXHxLkDZy Original-NNTP-Posting-Host: 195.200.76.252 User-Agent: G2/1.0 Injection-Date: Tue, 04 Feb 2014 15:28:52 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:203634 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:95904 Archived-At: On Tuesday, 4 February 2014 14:44:21 UTC, Nicolas Richard wrote: > 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? > > > > > > > highlight region and: > > M-x count-matches RET ; RET > Brilliant, thanks. Note you have to escape ;