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

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

Re: Counting words


From: Peter Dyballa
Subject: Re: Counting words
Date: Tue, 10 Apr 2007 17:13:46 +0200


Am 10.04.2007 um 13:46 schrieb Wilfred Zegwaard (privé):

I mean specific instances of words. The number of times eg that "the" occurs in a text. But I need to search on specific combinations, like "the exact word", but also a fuzzy search on specific combinations.

You might think of making the whole text or region temporarily to one line and split it at "the exact word" to have as many lines as instances exist.

For counting a particular word you can convert each instance of white space into a newline, grep for exactly this particular word, and then count (a pipe of tr, grep, wc as shell-command for example).

--
Greetings

  Pete

A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools.






reply via email to

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