How to Fix Word Wildcard Find and Replace for Citations Before Periods
Question details
The user needs a method to reorder punctuation by moving citation text placed after a period to before the period using Find and Replace.

- Product
- Microsoft Word
- Device & OS
- not provided
- Scenario
- Formatting document citations by batch-moving opening parentheses and the associated citation text so they appear before the ending period of a sentence.
- Observed behavior
- Standard regular expressions (like lazy quantifiers .*?) result in zero matches because Word's wildcard engine does not use standard POSIX regex syntax.
Before running complex wildcard replacements, always create a duplicate copy of your document to prevent unintended changes to your formatting or text.
Use Word's Specific Wildcard Syntax to Reorder Punctuation
Use Word's proprietary grouping and referencing tags to successfully capture the period and parenthesis, then swap their positions.
Microsoft Word does not process standard regular expressions like POSIX. Instead, it relies on its own wildcard syntax where groups are captured in parentheses and recalled using backslash formatting.
Press Ctrl + H to open the Find and Replace dialog box in Word, then click the 'More >>' button to expand the advanced options.
Check the box labeled 'Use wildcards' to activate the advanced pattern matching engine.
In the 'Find what' field, type (.)([(*]) exactly as shown. This captures the period in the first group and the opening citation parenthesis in the second group.
In the 'Replace with' field, type ^32\2\1 exactly. This inserts a space (^32), followed by the parenthesis group (\2), and finishes with the period group (\1).
Click 'Find Next' to test the first instance, then click 'Replace' to execute the change. If it works correctly, you can use 'Replace All' for the rest of the document.

Easily Batch Format Citations with WPS Writer
WPS Writer offers robust Find and Replace features that fully support wildcard operations, making it easy to fix formatting, reorder punctuation, and update citations across large documents.
- 1. Open your Document in WPS: Launch WPS Writer and open the document containing the citations you need to reformat.
- 2. Access Find and Replace: Press Ctrl + H to bring up the Find and Replace dialog.
- 3. Check Use Wildcards: Click the 'Options' button at the bottom of the dialog and check the 'Use wildcards' box.
- 4. Run the Replacement: Input your Find what and Replace with patterns, then click 'Replace' or 'Replace All' to instantly update your citations.

Frequently Asked Questions
Why do standard regular expressions fail in Word?
Microsoft Word does not use a standard POSIX or modern regex engine. It uses a proprietary wildcard syntax, meaning common regex operators like lazy quantifiers (.*?) are not recognized and will return zero matches.
What does ^32 mean in wildcard replacements?
^32 is the ANSI character code for a space in Word's Find and Replace system. It is often used in replacement strings to ensure a clean space is inserted without relying on hard-to-see spacebar strokes.
How do I capture and rearrange text using Word wildcards?
You can capture text by wrapping the patterns in parentheses () within the 'Find what' box. In the 'Replace with' box, you rearrange them by using a backslash and the group number, such as \2 to place the second captured group first.
Is it safe to use 'Replace All' with complex wildcards?
It is highly recommended to use 'Find Next' and 'Replace' individually for the first few instances to verify your wildcard syntax is correct before clicking 'Replace All'. Always keep a backup of your original document.




