Match set, Ge 307 – Nisus Writer Pro User Manual

Page 327

Advertising
background image

Polishing & Managing Documents

307

Match set

Use Match menu commands to match phrases found in Find and Replace expressions.

Or

Any characters on either side of the Or expression

Capture()

Causes the matched text it encapsulates to be available as one of the 'Captured'
items either later in the search string or in the replace string. This expression is
valid only in the search string, not in the replace string.

Found

Appears only in the Replace with variant of the Match menu and represents
whatever have been selected by Capture().

Captured1 - Captured10

Corresponds to that numbered portion of the Find expression (built within
parentheses), use in both Find and Replace expressions.

OtherCaptured

Corresponds to that numbered portion of the Find expression (built within
parentheses), use in both Find and Replace expressions.

FollowedBy() and PrecededBy()

Neither!FollowedBy() nor PrecededBy() “capture” anything. Think of them as a
nested!expression (or perhaps a “grouped”, “sub”, or “contained” expression).
These each require that the nested expression be present, but the content itself is
not included (that is “captured”) in the match. In other words, they are zero-width
and do not contribute to the full match. They function like the start/end of line
anchors (“$” and “^”) but allow somewhat arbitrary expressions. Only FollowedBy
()
allows arbitrary expressions. PrecededBy() requires the subexpression to be
fixed in width, or some combination of fixed width expressions.
As an example, let’s say you want to find the last word in any sentence, but don’t
want to select the punctuation mark itself. You could use the expression
illustrated in Figure 335. The FollowedBy() verifies that the word is FollowedBy()
a punctuation mark, but does not include that mark in the match.
PrecededBy() is the same, but it verifies the nested expression exists before the
following expression, rather than after.

Figure 335

The “LookAhead” PowerFind expression

Figure 336

The OtherCaptured PowerFind expression

Advertising