Count the number of replaced expressions

Nisus Thesaurus, Nisus Writer Classic– this is the place for all other Nisus products.
Post Reply
Posts: 17
Joined: 2003-02-07 07:48:35

Count the number of replaced expressions

Post by dakofi » 2003-02-07 08:25:27


I'm using Nisus Writer and the macro language.

I've a small question:

How can I get the number of replaced expressions replaced with the 'search and replace' function (s&r). The s&r function displays the number of found and replaced expressions in a message box. How can I get this number. I'm using a macro and I need this value to control the macro flow.
Or is there an other possibility to count the number of the same expression in one paragraph.

Thanks for your help.

User avatar
Official Nisus Person
Posts: 428
Joined: 2003-02-11 10:49:05
Location: Solana Beach, CA

Count the number of replaced expressions

Post by rmark » 2003-02-11 10:59:13

There is a command in Nisus Programming Dialect called "NumFound"

For example, the three line macro:

Find All "^.+" "g"
Clipboard="There are "=NumFound+" Paragraphs in this document"
:1 '\CC'

will display the number found on the Clipboard.

Try that.
Write On!
Mark Hurvitz
Nisus Software Inc.

Post Reply