Count occurrences of words or letters

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
Ashley Baksa

Count occurrences of words or letters

Post by Ashley Baksa »

How do you count occurrences of words or letters?

A feature in notetab pro allows you to count the number of occurrences of a letter or word within a document or group of documents and then displays the results.

For example if you take the sentence above the word 'of' is mentioned 3 times.

This feature is extremely handy. Can you help please?
Andreas

RE: Count occurrences of words or letters

Post by Andreas »

One way to do it is a search and replace.
Put the word you want to count into the find _and_ the replace box, then do a Replace all.
In the statusbar Textpad shows you the number of occurrences.

Andreas
vague

RE: Count occurrences of words or letters

Post by vague »

Mmm... but that destroys case if you want to maintain casing. If that's the case, turn on regular expression matching (and case sensitivity), search for the word

(word)

and replace with

\1


Good luck!=)
David Vanden Heuvel

RE: Count occurrences of words or letters

Post by David Vanden Heuvel »

alternatively, use the search in files.
specifiy the filename and the directory, and check the "file counts only" button.

this won't edit your file if you're edgy about search and replace.
Ashley Baksa

RE: Count occurrences of words or letters

Post by Ashley Baksa »

Firstly, thank you all for helping me out. I have tried all options and have found them all to work very well. Not quite as simple as NoteTab Light but I'm not complaining.

I really appreciate your speedy feedback.

Regards,

Ashley
Post Reply