Match characters, Powerfind pro find expressions, Powerfind pro replace expressions – Nisus Writer Pro User Manual

Page 343: Definitions in nisus writer pro

Advertising
background image

Polishing & Managing Documents

323

*

Finds zero or more occurrences of whatever that character or expression matches;
the equivalent of the command 0+ on the Repeat menu (“it may or may not be
there”) menu (it may or may not be there)

?

Finds zero or one occurrence of whatever that character or expression matches;
the equivalent of the command 0 or 1 on the Repeat menu; you can also use
minus inside brackets to signify a range

??, +?, *?

Finds the shortest match allowed from each of the three repeat characters.

Match characters

Matching characters using PowerFind Pro works much like matching characters using PowerFind.
The main differences are the metacharacters used and the added flexibility PowerFind Pro offers.

Character

What it Does

( to )

Defines a replaceable parenthesized expression that can be recalled by numerical
order; the equivalent of the various Capture commands in the Match menu

\1 to \20

Finds parenthesized expressions 1 to 20; the equivalent of the commands
Captured1 through Captured10 and the menu command Match >
OtherCaptured

(?: to )

Defines a parenthesized expression that does not create a “back reference”.

PowerFind Pro find expressions

Expression

Finds

\(([^(]|\n)+\)

Any text between parentheses

["“].+?["”]

Any text between quotes

^[[:alpha:]]+

Any alphabetic word at the beginning of a paragraph

\m(\w+)\s\1\M

Any two consecutive duplicate “words”; which don’t have to be alphabetic and can
be separated by a Tab or a Return

([x20\t])\1+

Two or more spaces or tabs in a row; to remove extra blank characters use \1 in
the Replace expression

[\x20\t]+$

Any number of spaces or tabs that end a paragraph; to remove trailing blanks at
the end of a paragraph, leave the Replace box blank

^

Beginning of a paragraph that contains text or images

(["”])([.,])

A quotation mark followed by a period or a comma; conventionally the comma and
the period are enclosed within quotation marks—to rearrange these punctuation
marks and the quotation mark use \2\1 in the Replace expression

([;])(["”])

A semicolon or a colon followed by a quotation mark; conventionally the colon and
semicolon aren’t enclosed within quotation marks—to rearrange these
punctuation marks and the quotation mark use \2\1 in the Replace expression

[\x020]+\.

Any trailing blanks before a period

[G-Z]

Finds any uppercase character except A through F

PowerFind Pro replace expressions

If a metacharacter or expression has a unique match then it can be used in constructing
replacement patterns. If a metacharacter is not allowed in a particular context, Nisus Writer Pro will
not let you select it from the menu in PowerFind. No such restriction applies when using PowerFind
Pro.

Definitions in Nisus Writer Pro

Item

What it Defines

Alphabetic Characters

All characters in the range Aa through Zz plus all the

4

and

1

4

alphabetics

(all modified alphabetics European languages use). Modified alphabetics are also
called Diacriticals, sometimes called “delayed strike” characters;

Alphanumeric Characters

All alphabetics and digits 0 through 9, Control Characters, ASCII (Unicode) code
characters 0-12 and 14-31 (these are “non-printing” characters);

Advertising