How to Search for Email Addresses with Hyphens in Word Using Wildcards
Question details
The user wants to find email addresses containing hyphens in a Word document using a wildcard search, but the standard search pattern fails to capture the entire address.

- Product
- Microsoft Word
- Device & OS
- not provided
- Scenario
- Extracting or locating email addresses that contain complex characters (such as hyphens) within a document.
- Observed behavior
- The default wildcard pattern stops matching when it encounters a hyphen, failing to capture the full domain or username of the email address.
Ensure you have the 'Use wildcards' option enabled in the Advanced Find dialog box before running your search query, otherwise the pattern will be treated as plain text.
Use a Refined Wildcard Pattern
Update the wildcard search string to explicitly include hyphens in the character sets, allowing Word to match the full email address.
In Word's wildcard syntax, the hyphen is often interpreted as a range indicator (like A-Z). By specifically escaping it or placing it appropriately within the brackets, you force Word to read it as a literal hyphen character.
Press Ctrl+H to open the Find and Replace dialog box, switch to the 'Find' tab, and click the 'More >>' button to reveal advanced options.
Check the box next to 'Use wildcards' in the Search Options section.
Type the following pattern into the 'Find what' box: <[A-Za-z0-9._\-]{1,}\@[A-Za-z0-9_\-]{1,}.[A-Za-z0-9._\-]{1,}>
Click 'Find Next' to locate addresses one by one, or click 'Find In' > 'Main Document' to highlight all matching email addresses simultaneously.

Use VBA and Regular Expressions for Reliable Validation
For highly reliable email extraction, especially with complex domain structures, use a VBA macro with VBScript Regular Expressions.
Find and Edit Text Efficiently in WPS Writer
WPS Office offers robust Find and Replace features, including full wildcard support, to help you quickly locate specific data formats like email addresses in your documents.
- 1. Open the Document: Launch WPS Writer and open the document containing the email addresses.
- 2. Launch Find and Replace: Press Ctrl+F to open the Find and Replace dialog.
- 3. Turn on Wildcards: Click the settings icon or 'Advanced' and check the 'Use wildcards' option.
- 4. Search with Pattern: Enter the wildcard pattern and click 'Find Next' to locate the hyphenated email addresses.

Frequently Asked Questions
Why does my wildcard search stop at the hyphen?
In Word wildcard searches, the hyphen is normally used to define character ranges (like A-Z). To search for a literal hyphen as part of an email address, you must escape it using a backslash (\-) within the character brackets.
Can I extract all found email addresses to a new document?
Yes. After running the search and selecting 'Find In' > 'Main Document', all matching email addresses will be highlighted. You can press Ctrl+C to copy them, open a new document, and paste the list.
What does {1,} mean in the wildcard pattern?
The {1,} syntax specifies that the preceding character or character set must appear one or more times. This ensures that there is actual text before the @ symbol, after the @ symbol, and after the period in the domain.




