One aspect which
I haven't covered yet is the treatment of certain special characters
when
using wildcards. These are characters which are commonly used as part of
wildcard expressions or formulas, such as brackets or question marks. If they
are
being
used to make the expression work, how can the characters themselves be
found and replaced?
This is when you need to use the backslash character: '\'.
Whenever you want to use one of the wildcard special characters in your search,
just precede
it with a backslash.
Special characters which are affected in this way
include round brackets, square brackets, angled brackets, question marks,
asterisks,
exclamation marks and @ signs.
Here's an example where I want to remove
all the round brackets surrounding a year in a bibliography (for example,
change '(2003)' to '2003').
Go to Edit > Replace...
Make sure the Use wildcards option is selected.
In the Find what: box,
type in the following:
\((<[0-9]@>)\)
This finds an opening round bracket: '\(', followed by a set of numbers:
'(<[0-9]@>)',
followed by a closing round bracket: '\)'.
In the 'Replace with:'
box, type in the following:
\1
which repeats the set of numbers, without the round brackets
around it.
Click on Replace All.
Simple!
Note: You don't need to use the backslash character in the
Replace with box for these 'special' characters.