Word’s Wildcards can find patterns and strings of text in a dynamic fashion, providing the opportunity to identify potential errors or manipulate text by applying formatting, changing text order, or adding or removing content. See the Regular Expressions Resource page for searches that can be run on text-only files.
Note: The wildcards presented here are for general use. Always confirm that any changes being made conform to the required style of the publication.
Pitfalls of Word (.docx)
Because editorial work is typically performed in Microsoft Word files, Wildcards can be very useful. However, unlike a text-only file, Word files can hide content or treat text differently depending on the circumstance. A search that will find the end of a line in the body of a file may not find that same text within an embedded footnote or endnote, for example. This is due to Word’s treatment of embedded notes as a kind of variable, as opposed to paragraphs that simply end as one might expect.
Users should be mindful of these issues when working in Word. In a text-only file, however, like the .sam and .scml file types that are standard in Scribe’s Well-Formed Document Workflow, all text is up front and can therefore be manipulated with greater control. It is recommended, therefore, that certain changes be made in .sam files rather than .docx. It is important, then, to be aware of how these file types function so the best choice can be made for where and when to apply changes to content.
Users must be mindful, too, of the dangers of performing global changes through search and replace. Searches should always be tested before running them so that large-scale errors are not introduced. Additionally, track changes cannot be used with some replacements. An incorrect search could accidentally remove all commas in a book or add hyphens throughout a file. Before applying global changes or working with an untested search, files should be backed up so that an earlier version can be retrieved if needed.
Wildcard Resources and the SAI
This resource page does not attempt to explain the basic functions of Word Wildcards. For more information on the building blocks of Wildcards, the following web pages provide details and screenshots:
The SAI (Scribe Add-In for Word) has numerous clean-up functions that can perform more reliably than Wildcard searches. Before attempting to use Wildcards, confirm that it is not something the SAI can do.
The SAI can save find/replace expressions, so if a particular find/replace is useful in many projects, add it to your SAI as a saved routine.
Wildcards
General Punctuation
Check for any initials for authors that haven't been separated.
Find:
([A-Z])\.([A-Z])\.
Replace with:\1. \2.
Search for hyphens between numbers.
Find:
([0-9])-([0-9])
Replace with:\1–\2
Search for punctuation placed incorrectly in a sentence.
Find:
([a-zA-Z ])([\.\,\:\;\!\?])([a-zA-Z])
Search for any double punctuation that might be unintentional.
Find:
([\.\,\:\;\!\? ])([\.\,\:\;\!\?])
Search for punctuation that is spaced incorrectly.
Find:
( )([\.\,\:\;\!\?\%\)])
Find:( )([\.\,\:\;\!\?”\)])
Search for any double parentheses or square brackets.
Find:
([\]\)\(\[])([\]\)\(\[])
Search for a comma or period outside of an end quotation mark.
Find:
([’”])([\.\,])
Search for space after an open quotation mark or parenthesis.
Find:
([“\(])( )
Typesetter Notes
Search for all the comments for the typesetter. Confirm the figure heads follow and that they match the style to which the document is being edited.
Find:
\{~\?~(*)\}
Find:([\{~\}\_])
Hyphens, En Dashes, and Em Dashes
Search for improper spacing with hyphens, en dashes, and em dashes.
Find:
( )([-—–])( )
Find:( )([-—–])
Find:([-—–])( )
Search for double hyphens or en dashes.
Find:
([-–])([-–])
Inclusive Numbers
Search for improper inclusive numbers. (Confirm the required style uses inclusive numbers.)
Find:
([0-9]{3})–([0-9]{3})
Find:([0-9])([0-9])([0-9])–([0-9])([\,\. \?\:\!\;\:])
Find:([0-9])([0-9])([0-9])–([0-9])^013
Search for abbreviated page ranges if they are not supposed to be abbreviated.
Find:
([0-9])([0-9])([0-9])–([0-9])([0-9])([!0-9])
Unexpected Character Patterns
Search for no punctuation between a closing parenthesis and a page range.
Find:
\) ([0-9])
Search for an endnote number with a space before it.
Find:
[ ]^2
Search for a comma before a parenthesis.
Find:
, \(
Common Usage Errors
Search for any improper usage of “which” that should be “that.”
Find:
([a-zA-Z0-9]) which
Search for redundant quotes after “so-called.” (They are not necessary.)
Find:
so-called “
Search for “between … to” and replace with “between … and”
Find:
between ([A-z0-9]@) to
Replace with:between \1 and
Search for potential errors in hyphenation between words pertaining to timespans.
Find:
([a-z])\-year
Find:([a-z])\-month
Find:([a-z])\-week
Find:([a-z])\-day
Find:([a-z])\-hour
Find:([a-z])\-minute
Find:([a-z])\-second
Reference Lists (General)
The following searches are to be done within the rf paragraph style.
Search for all instances of the publication year not followed by period.
Find:
\(([0-9]{4})\)[!\.]
Search for all instances of inclusive numbers in page ranges for chapters.
Find:
([0-9]{3})–([0-9]{2})\)
Search for all instances of inclusive numbers in page ranges at end of a reference (i.e., for journals).
Find:
([0-9]{3})–([0-9]{2})\.
If working in an APA references list, search for instances of ampersands not preceded by comma.
Find:
[!,] &
Search for a missing period between author initials and publication year.
Find:
([A-Z]) \(
Search for a missing comma between an author’s last name and initials. False positives will include instances of last names following the word “In.”
Find:
([a-z]) ([A-Z])\.
Search for missing periods after initials in author names.
Find:
([A-Z]),
Search for publication years not enclosed in parentheses.
Find:
\. ([0-9]{4})\.
Search for missing periods after corporate authors.
Find:
([a-z]) \(([0-9]{4})
Search for missing comma between authors. (This search will not find names that include accented letters or special characters.)
Find:
[A-Z][a-z]@, [A-Z. -]@\. [A-Z][a-z']
Search for missing commas.
Find:
([a-z]) ([A-Z])\.([A-Z])\. \(
Find:([a-z]) ([A-Z])\.([A-Z])\.,
Find:([a-z]) ([A-Z])\.,
Find:([a-z]) ([A-Z])\. \(
Search for missing punctuation (period or comma).
Find:
\) ([A-z])
Search for missing comma (add comma or close up space, as needed).
Find:
[ ]([A-Z])\. ([A-Z])
Search for a period being used instead of a comma.
Find:
([a-z])\. ([A-Z])\.
Reference Lists (Style Guide Requirements)
With match case turned on, search for an editor (Ed.) missing the required period (APA).
Find:
(Ed)
With match case turned on, search for editors (Eds.) missing the required period (APA).
Find:
(Eds)
Search for lowercase subtitles (APA & CMS).
Find:
: ([a-z])
Search for missing periods in hyphenated initials (APA).
Find:
([A-Z])-([A-Z])
Search for potential author name errors (APA).
Find:
([A-Z])\.[ ]([A-Z])[ ]
Find:([A-Z])\.([A-Z])[ ]
Find:([A-Z])\.([A-Z])[ ]([A-Z])
Search for missing serial commas.
Find:
<([A-z]@)>, <([A-z]@)> and
Reference Lists (Parentheticals)
The following searches may run faster and return fewer false positives if the references section is copied into a separate document. Apply any necessary changes in the main document.
Search for multiple citations separated by comma instead of semicolon.
Find:
([0-9]), ([A-Z])
Search for a missing comma between an author and the publication year.
Find:
([a-z]) ([0-9])
Search for a missing comma between “et al.” and the publication year.
Find:
et al. ([0-9])
Search for a missing comma before an ampersand with three or more authors.
Find:
([A-z]+), ([A-z]+) &
Search for a missing “p.” after the publication year.
Find:
([0-9]{4}), ([0-9])