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

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

Re: How to get count of a specific character


From: Loris Bennett
Subject: Re: How to get count of a specific character
Date: Tue, 04 Feb 2014 15:49:35 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

Angus Comber <anguscomber@gmail.com> 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.


reply via email to

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