NOTE: this software is for Classic Mac OS (eg: OS 9) and cannot be used on Mac OS X.
Nisus Writer Classic is no longer for sale. This page is only for archival purposes.
"GREP" stands for "Global Regular Expression Program (or Parser)." It is a misnomer because it does not search for regular expressions in general, but actually a superset of all regular expressions. Nisus Writer is capable of searching any regular expression. An example of a regular expression that cannot be searched for using standard GREP is (in Nisus Writer notation):
\(yadda.*\)*\.
This is a valid Nisus Writer search pattern, but is not a GREP expression because, in GREP, you cannot place a * after a \) meta-character. It is, however, a regular expression (there are books that explain the exact definition of a "regular expression"; in general they can form a "finite state machine")
Here are some strings that match this pattern:
yadda yadda yadda.
yaddady yadda yadda.
yaddady-yad; yadda.
Another regular expression that cannot be expressed in GREP is:
yadda.*|blah
Because GREP does not allow the | (OR) metacharacter with any other metacharacter in the same expression.
Both Nisus Writer and GREP allow you to search for things that are NOT regular expressions. (The \1 metacharacter is not a regular expression.)
Once a pattern has been "found" and there are two possible matches at a certain point in the document--each with different length, Nisus Writer allows you to specify which of these found matches is preferred. For example, a * after any sub-expression means to prefer the longest match. A :* after any sub-expression prefers the shortest match.
GREP has been in Nisus Writer since its earliest version and before that in the text editor produced by Nisus Software: QUED/M. It appeared in QUED/M (and its predecessor before any version of Think C (at that time, Lightspeed C). QUED was originally written in MegaMax C.
You probably feel better now that you know this. A little background usually helps make concepts in real life a bit easier to handle.
And now, back to our lesson.