Replace all characters word

Find and replace text

Your browser does not support video. Install Microsoft Silverlight, Adobe Flash Player, or Internet Explorer 9.

  1. Go to Home > Replace.

  2. Enter the word or phrase you want to replace in Find what.

  3. Enter your new text in Replace with.

  4. Choose Replace All to change all occurrences of the word or phrase. Or, select Find Next until you find the one you want to update, and then choose Replace.

  5. To specify only upper or lowercase in your search, select More > Match case. There are several other ways to search in this menu.

Match case

For other options, see Find and replace text

Find and replace basic text

In the upper-right corner of the document, in the search box Enter text to search for in the document, type the word or phrase that you want to find, and Word will highlight all instances of the word or phrase throughout the document.

To replace found text:

  1. Select the magnifying glass, and then select Replace.

    The Replace option is highlighted in the Search box

  2. In the Replace With box, type the replacement text.

  3. Select Replace All or Replace.

    Tips: 

    • You can also open the basic Find and Replace pane with the keyboard shortcut CONTROL + H.

    • When you replace text, it’s a good idea to select Replace instead of Replace All. That way you can review each item before replacing it.

You can find text with special formatting, such as bold or highlight, by using the Format menu.

  1. Select View > Navigation Pane.

    On the View tab, Navigation Pane is checked

  2. In the Navigation Pane, select the magnifying glass.

  3. Select Settings Screenshot of gear, and then select Advanced Find & Replace.

    In the Find and Replace box, Advanced Find and Replace is highlighted

    Notes: 

    • Select the arrow at the bottom of the Find and Replace dialog box to show all options.

    • Shows how to open the Format popup menu

  4. On the Format menu, select the option that you want.

    Shows the Format options

    If a second dialog box opens, select the options that you want, and then select OK.

  5. In the Find and Replace dialog box, select Find Next or Find All.

You can find and replace text with special formatting, such as bold or highlight, by using the Format menu.

  1. Select View > Navigation Pane.

    On the View tab, Navigation Pane is checked

  2. In the Navigation Pane, select the magnifying glass.

  3. Select Settings Screenshot of gear, and then select Advanced Find & Replace.

    In the Find and Replace box, Advanced Find and Replace is highlighted

  4. At the top of the dialog box, select Replace.

    Notes: 

    • Select the arrow at the bottom of the Find and Replace dialog box to show all options.

    • Shows how to open the Format popup menu

  5. On the Find what box, type the text that you want to find.

  6. On the Format menu, select the formatting that you want to find.

    Shows the Format options

    If a second dialog box opens, select the options that you want, and then select OK.

  7. Select in the box next to Replace with.

  8. On the Format menu, select the replacement formatting. If a second dialog box appears, select the formats that you want, and then select OK.

  9. Select Replace, Replace All, or Find Next.

  1. Select View > Navigation Pane.

  2. In the Navigation Pane, select the magnifying glass.

  3. Select Settings Screenshot of gear, and then select Advanced Find & Replace.

    In the Find and Replace box, Advanced Find and Replace is highlighted

    Notes: 

    • Select the arrow at the bottom of the Find and Replace dialog box to show all options.

    • Shows how to open the Format popup menu

  4. On the Special menu, select the special character that you want to find.

    Find special characters

  5. Select Find Next.

  1. Select View > Navigation Pane.

    On the View tab, Navigation Pane is checked

  2. In the Navigation Pane, select the magnifying glass.

  3. Select Settings Screenshot of gear, and then select Advanced Find & Replace.

    In the Find and Replace box, Advanced Find and Replace is highlighted

    Notes: 

    • Select the arrow at the bottom of the Find and Replace dialog box to show all options.

    • Shows how to open the Format popup menu

  4. At the top of the Find and Replace dialog box, select Replace and then select in the Find What box, but don’t type anything there. Later, when you select a special character, Word will automatically put the character code in the box for you.

    Note: Select the arrow at the bottom of the Find and Replace dialog box to show all options.
    Shows how to open the Format popup menu

  5. On the Special menu, select the special character that you want to find.

  6. Select in the Replace with box.

  7. On the Special menu, select the special character that you want to use as a replacement.

  8. Select Replace or Find Next.

  1. Select View > Navigation Pane.

    On the View tab, Navigation Pane is checked

  2. In the Navigation Pane, select the magnifying glass.

  3. Select Settings Screenshot of gear, and then select Advanced Find & Replace.

    In the Find and Replace box, Advanced Find and Replace is highlighted

  4. Select the Use wildcards check box.

    If you don’t see the Use wildcards check box, select Down arrow for more options.

  5. Select the Special menu, select a wildcard character, and then type any additional text in the Find what box.

    Using wildcards in the Find and Replace dialog box

  6. Select Find Next.

    Tips: 

    • To cancel a search in progress, press The Command button.+ PERIOD.

    • You can also enter a wildcard character directly in the Find what box instead of selecting an item from the Special pop-up menu.

    • To search for a character that’s defined as a wildcard character, type a backslash () before the character. For example, type ? to find a question mark.

    • You can use parentheses to group the wildcard characters and text and to indicate the order of evaluation. For example, search for <(pre)*(ed)> to find «presorted» and «prevented.»

    • You can search for an expression and use the n wildcard character to replace the search string with the rearranged expression. For example, type (Newman) (Belinda) in the Find what box and 2 1 in the Replace with box. Word will find «Newman Belinda» and replace it with «Belinda Newman.»

  7. To replace found text:

    1. Select the Replace tab, and then select the Replace with box.

    2. Select Special, select a wildcard character, and then type any additional text in the Replace with box.

    3. Select Replace All, Replace, or Find Next.

      Tip: When you replace text, it’s a good idea to select Replace instead of Replace All. That way you can confirm each replacement to make sure that it’s correct.

You can refine a search by using any of the following wildcard characters.

To find

Use this

For example

Any single character

?

s?t finds «sat» and «set.»

Any string of characters

*

s*d finds «sad» and «started.»

One of the specified characters

[ ]

w[io]n finds «win» and «won.»

Any single character in this range

[-]

[r-t]ight finds «right» and «sight» and «tight.»

Ranges must be in ascending order.

Any single character except the characters inside the brackets

[!]

m[!a]st finds «mist» and «most» but not «mast.»

Any single character except characters in the range inside the brackets

[!x-z]

t[!a-m]ck finds «tock» and «tuck» but not «tack» or «tick.»

Ranges must be in ascending order.

Exactly n occurrences of a character or expression

{ n}

fe{2}d finds «feed» but not «fed.»

At least n occurrences of a character or expression

{ n,}

fe{1,}d finds «fed» and «feed.»

A range of occurrences of a character or expression

{ n, n}

10{1,3} finds «10,» «100,» and «1000.»

One or more occurrences of a character or expression

@

lo@t finds «lot» and «loot.»

The beginning of a word

<

<(inter) finds «interesting» and «intercept» but not «splintered.»

The end of a word

>

(in)> finds «in» and «within,» but not «interesting.»

Word for the web lets you find and replace basic text. You can match case or fine whole words only. For more varied options, open your document in Word for the desktop.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Find and Replace Text and Numbers in Word

by Avantix Learning Team | Updated March 7, 2022

Applies to: Microsoft® Word® 2013, 2016, 2019, 2021 or 365 (Windows)

You can find and replace in Word using the Find and Replace dialog box as well as the Navigation Pane. If you use the dialog box, you can find and replace text and numbers and use wildcards for more advanced find and replace tasks. Wildcards are useful when you are not able to find an exact match. You can display the Find and Replace dialog box using a keyboard shortcut or the Home tab in the Ribbon.

Recommended article: How to Quickly Remove Hard Returns in Word Documents

Do you want to learn more about Microsoft Word? Check out our virtual classroom or in-person Word courses >

Note: Screenshots in this article are from Word 365 but are similar in previous versions of Word.

The Replace command appears on the Home tab in the Ribbon in the Editing group:

Replace command on Home tab in the Ribbon to find and replace words or characters.

Using the Find and Replace dialog box to replace words or characters (and match case)

You can perform simple find and replace tasks using the Replace dialog box in its collapsed state. To access more advanced options, you will need to click More in the Replace dialog box to expand it.

To use the Find and Replace dialog box to find and replace text in Word (words or characters) and match case if needed:

  1. Click the Home tab in the Ribbon.
  2. In the Editing group, click Replace to display the Replace dialog box. Alternatively, press Ctrl + H if you prefer to use a keyboard shortcut to open the Replace dialog box.
  3. Enter the text you want to find in the Find What box. You can specify whether Word should locate only matches with the exact capitalization by clicking More and then selecting or checking Match case.
  4. Enter the text you want to replace in the Replace box.
  5. Click Find Next and then click Replace for each occurrence or click Replace All.
  6. Click Close.

In the following example, the Replace dialog box has been expanded to display other options including Match case:

Replace dialog box in Word to find and replace using exanded options.

Finding and replacing using wildcards

To use wildcards, you will need to use the Find and Replace dialog box and expand it to display more options. You can then select the option to Use wildcards. A wildcard can replace one or more characters in a string of text or numbers. The most common wildcard is the asterisk (*).

It’s important to note that wildcard searches are case sensitive. Also, Word uses «lazy» pattern matching so it will stop matching as soon as possible. This means that you could enter part of a word and find that part without using wildcards.

To find and replace text using wildcards in Word:

  1. Position the cursor at the location in the document where you want to start finding and replacing. If you want to start at the beginning of the document, you can press Ctrl + Home.
  2. Click the Home tab in the Ribbon.
  3. In the Editing group, click Replace. Alternatively, press Ctrl + H. A dialog box appears.
  4. Select More to expand the dialog box.
  5. Click in the Find What box.
  6. Select or check the Use wildcards checkbox.
  7. Enter the text and wildcard(s) you want to use. For example, enter s*l to find any text starting with s and ending with l.
  8. Click in the Replace with box.
  9. Enter the text you want to use to replace the text in the Find what box.
  10. Click Find Next to find the first instance of the characters you want to find.
  11. Click Replace or Replace All. If you click Replace, Word will select the next matching characters in the Find what box. If you click Replace All, Word will display a dialog box with the number of replacements. In this case, click OK.
  12. If necessary, click Replace again. Repeat for each instance.
  13. Click Close to close the dialog box.

In the following example, b*s has been entered in the Find what box to find any word starting with starting with b and ending with s:

Find and replace in Word using the Replace dialog box and wildcards.

If you want to undo a Replace or Replace All action, close the dialog box and press Ctrl + Z.

Using common wildcards

The most common wildcards you can use in the Find and Replace dialog box are the asterisk (*) to find multiple characters and the question mark (?) to find a single character.

For example:

b*l will find ball and barrel (a character followed any characters and ending with a specific character)

h?ll will find hill and hall (a character followed by any single character and then followed by 2 characters)

Using wildcards to find one or more instances of the same character

You can also use @ as a wildcard to find one or more instances of the same character.

For example:

catchal@ will find catchal or catchall

Using wildcards for alternate characters and ranges

You can also use wildcards to find alternate characters or ranges of characters. These are entered in square brackets [ ] and may be combined with other wildcards.

[ ] can be used to find each of a set of characters

[ – ] can be used to find each of a set of characters in a range

You can use any character or series of characters in a range within the square brackets (including the space character). Characters are processed in alphanumeric order from lowest to highest.

For example:

[abc] will find any of the letters a, b, or c

[G] will find the upper case letter G

[A-Z] will find any upper case letter

[0-9] will find any single number

[13579] will find any odd number

[0-9A-z] will find any number or letter

f[ai]n will find each of the characters in square brackets such as fan or fin

[b-f]at will find each of a range of characters such as bat, cat, and fat

Using wildcards to omit characters

If you want to omit specific characters, you can use an exclamation mark (!) combined with square brackets.

For example:

[!f]ast will find last and past but not fast

Using wildcards to find the beginning or end of a word

You can use the less than symbol (<) to find the beginning of a word and the greater than symbol (>) to find the end of a word. These wildcards are combined with characters in round brackets or parentheses.

For example,

<(watch) will find watching or watchman

(all)> will find wall or stall

These wildcards can be problematic if you are using a wildcard and you want to find > or < as characters in the document. If this is the case, enter a backslash () in front of the character so that it is not treated as a wildcard.

For example,

<*> will find <h1> or <h2>

Using wildcards to find instances of a character

You can use curly brackets { } to specify the number of instances of a character. These brackets can be combined with a comma to specify the number of instances. Counting can be used with individual characters or with sets of characters.

{n} is used to find the number of instances of a character

{n,} is used to find at least n instances of a character

{n,m} is used to find between n and m instances of a character

For example:

^p{2} will find two consecutive paragraph marks or hard returns (^p is a special character for a paragraph mark in Word)

{3} will find three spaces (there is a space entered before the first curly bracket)

30{2,} will find at least 2 instances of the preceding character such as 3000 or 30000

30{3,4} will find between 3 and 4 instances of the preceding character such as 30000 or 300000 not 300

These last wildcards are particularly useful if you are finding and replacing numbers in Word.

The Find and Replace dialog box offers more functionality as well. For example, you can also Find and Replace Formatting in Word.

Subscribe to get more articles like this one

Did you find this article helpful? If you would like to receive new articles, join our email list.

More resources

How to Add Page Numbers in Word (Step by Step)

How to View Document Statistics in Microsoft Word

How to Update All Figure Numbers in Microsoft Word

How to Check Word Count in Microsoft Word (4 Ways)

How to Superscript or Subscript in Word (with Shortcuts)

Related courses

Microsoft Word: Intermediate / Advanced

Microsoft Word: Designing Dynamic Word Documents Using Fields

Microsoft Word: Long Documents Master Class

Microsoft Word: Accessible Word Documents

Microsoft Excel: Intermediate / Advanced

Microsoft PowerPoint: Intermediate / Advanced

VIEW MORE COURSES >

Our instructor-led courses are delivered in virtual classroom format or at our downtown Toronto location at 18 King Street East, Suite 1400, Toronto, Ontario, Canada (some in-person classroom courses may also be delivered at an alternate downtown Toronto location). Contact us at info@avantixlearning.ca if you’d like to arrange custom instructor-led virtual classroom or onsite training on a date that’s convenient for you.

Copyright 2023 Avantix® Learning

Microsoft, the Microsoft logo, Microsoft Office and related Microsoft applications and logos are registered trademarks of Microsoft Corporation in Canada, US and other countries. All other trademarks are the property of the registered owners.

Avantix Learning |18 King Street East, Suite 1400, Toronto, Ontario, Canada M5C 1C4 | Contact us at info@avantixlearning.ca

‎This tutorial shows three ways to find and replace special characters in Microsoft Word:

1. Enter special characters directly into the Find and Replace dialog box

2. Select special characters from within the Find and Replace dialog box

3. Use keyboard shortcuts or caret codes

We’ll focus on the preset special characters available through Word’s Symbol dialog box.

This tutorial is also available as a YouTube video showing all the steps in real time.

Watch more than 200 other writing-related software tutorials on my YouTube channel.

Please note that Word’s Find and Replace tool doesn’t work with ten of the special characters related to formatting: 1/4 em space, no-width optional break, no-width nonbreak, left-to-right mark, right-to-left mark, left-to-right embedding, right-to-left embedding, left-to-right override, right-to-left override, and pop directional formatting.

For more information on special characters, visit “What Are Special Characters in Microsoft Word?” and “How to Insert Special Characters in Microsoft Word.”

The images below are from Word for Microsoft 365. The steps are the same for Word 2019 and Word 2016 and similar for Word 2013 and Word 2010.

Enter Special Characters Directly into the Find and Replace Dialog Box‎‏

Twelve special characters can be inserted directly into the Find and Replace dialog box by selecting the character:

  • Em dash
  • En dash
  • Em space
  • En space
  • Copyright symbol
  • Registered symbol
  • Trademark
  • Section symbol
  • Paragraph symbol
  • Ellipsis
  • Double opening quote
  • Double closing quote

To insert special characters directly into the Find and Replace dialog box:

1. Select the special character in your text. (The copyright symbol appears in this example.)

Copyright symbol selected.

Figure 1. Copyright symbol selected

2. Select the Home tab in the ribbon.

Home tab in Word 2019/Word 365

Figure 2. Home tab

3. Select Replace in the Editing group.

Replace button in the Editing Group in Word 2019/Word 365

Figure 3. Replace in the Editing group

4. Ensure that the special character appears in the Find what text box in the Find and Replace dialog box. (Some special characters aren’t visible in the text box, so do a test run before selecting the Replace All button in step 6.)

Copyright symbol in the Find What text box in the Find and Replace dialog box

Figure 4. Copyright symbol in the Find What text box

5. Enter the replacement character in the Replace with text box. (The trademark appears in this example.)

Trademark in the Replace With text box in the Find and Replace dialog box in Word 2019 / Word 365

Figure 5. Trademark in the Replace With text box

6. Select the Replace, Replace All, or Find Next button.

  • Replace replaces the next occurrence.
  • Replace All replaces all occurrences.
  • Find Next finds the next occurrence without making a replacement.

Replace, Replace All, and Find Next buttons in the Find and Replace dialog box in Word 2019/Word 365

Figure 6. Replace, Replace All, and Find Next buttons

If you selected Replace All, a series of small dialog boxes will tell you how many replacements were made. Select the Yes and OK buttons to close those dialog boxes.

7. Select the Close button to close the Find and Replace dialog box.

Close button in the Find and Replace dialog box in Word 2019/Word 365

Figure 7. Close button

Pro Tip: You can also copy (ctrl + c) and paste (ctrl + v) the twelve special characters mentioned above directly into the Find and Replace dialog box.

Select Special Characters from within the Find and Replace Dialog Box

Seven special characters can be inserted into the Find and Replace dialog box through the Special drop-down menu:

  • Em dash
  • En dash
  • Nonbreaking hyphen
  • Optional hyphen
  • Nonbreaking space
  • Section symbol
  • Paragraph symbol

To select special characters from within the Find and Replace dialog box:

1. Select the Home tab in the ribbon (see figure 2).

2. Select Replace in the Editing group (see figure 3).

3. Place your cursor in the Find what text box in the Find and Replace dialog box.

Cursor in the Find What text box in the Find and Replace dialog box in Word 2019/Word 365

Figure 8. Cursor in the Find What text box

4. Select the More button. (Skip to Step 5 if the Less button is already visible.)

More button in the Find and Replace dialog box in Word 2019/Word 365

Figure 9. More button

5. Select the Special button.

Special button in the Find and Replace dialog box in Word 2019/Word 365

Figure 10. Special button

6. Select the special character from the menu.

Special menu in the Find and Replace dialog box in Word 2019/Word 365

Figure 11. Special menu

The special character will appear in the Find what text box as a caret code. The caret code for the em dash appears in figure 12, below.

7. Enter the replacement character in the Replace with text box. (Repeat step 5 and step 6 if you are replacing the existing character with one of the seven available in this dialog box. The caret code for the en dash appears in this example.)

Em dash and en dash caret codes in the Find and Replace dialog box in Word 2019/Word 365

Figure 12. Caret codes in the Find What and Replace With text boxes

8. Select the Replace, Replace All, or Find Next button (see figure 6).

9. Select the Close button to close the Find and Replace dialog box (see figure 7).

Use Keyboard Shortcuts or Caret Codes

Fifteen special characters can be inserted into the Find and Replace dialog box using a keyboard shortcut and/or a caret code:

  • Em dash
  • En dash
  • Nonbreaking hyphen
  • Optional hyphen
  • Nonbreaking space
  • Copyright symbol
  • Registered symbol
  • Trademark
  • Section symbol
  • Paragraph symbol
  • Ellipsis
  • Single opening quote
  • Single closing quote
  • Double opening quote
  • Double closing quote

The table below lists the keyboard shortcuts and caret codes for finding and replacing the special characters listed above. Several of these special characters have a keyboard shortcut and a caret code.

Table of Keyboard Shortcuts and Caret Codes for How to Find and Replace Special Characters in Microsoft Word

To insert special characters using keyboard shortcuts or caret codes:

1. Select the Home tab in the ribbon (see figure 2).

2. Select Replace in the Editing group (see figure 3).

3. Type the keyboard shortcut or caret code into the Find what text box (see figure 4).

4. Enter the replacement character in the Replace with text box (see figure 5).

5. Select the Replace, Replace All, or Find Next button (see figure 6).

6. Select the Close button to close the Find and Replace dialog box (see figure 7).

Pro Tip: You can also use the keyboard shortcuts shown above to insert special characters directly into your text. For a full list of keyboard shortcuts for special characters, see “How to Insert Special Characters in Microsoft Word.”

Related Resources

How to Find and Replace Text in Microsoft Word

How to Find and Replace Font Formatting in Microsoft Word

Updated December 09, 2022

The fastest way to remove words, characters, strings or anything between two known tags or two known characters in a string is by using a direct and Native C approach using RE along with a Common as shown below.

var = re.sub('<script>', '<!--', var)
var = re.sub('</script>', '-->', var)
#And finally
var = re.sub('<!--.*?-->', '', var)

It removes everything and works faster, better and cleaner than Beautiful Soup.
Batch files are where the «» got there beginnings and were only borrowed for use with batch and html from native C». When using all Pythonic methods with regular expressions you have to realize that Python has not altered or changed much from all regular expressions used by Machine Language so why iterate many times when a single loop can find it all as one chunk in one iteration? Do the same individually with Characters also.

var = re.sub('[', '<!--', var)
var = re.sub(']', '-->', var)
And finally
var = re.sub('<!--.*?-->', '' var)# wipes it all out from between along with.

And you do not need Beautiful Soup. You can also scalp data using them if you understand how this works.

Replace text that you enter or paste into the Input window with the value that you place into the “Find text” field. This “Replace text” feature is not case sensitive. If you put the word “red” into the “Find text” field you will replace “red” and not “Red” where it appears. To use the feature, follow these steps and see the example.

  • 1. In the Input window, type or paste the block of text that includes the material that you want to replace.
  • 2. In the “Find text” field, enter the text that you want to replace, noting that this is not case sensitive. If you enter “red” you replace “red” only and “Red” if it appears.
  • 3. In the “Replace with” field, place the text you want to use for replacing.
  • 4. In the Output window, see the block of text with the text replaced.

Here is the example

Input

We want the front room painted red. Red will provide the look we want in the back room.
Find text 
red
Replace with
yellow
Output
We want the front room painted yellow. Red will provide the look we want in the back room.

Like this post? Please share to your friends:
  • Rephrase the following sentences using the word time
  • Repetitions of words and word groups
  • Repetition of the word and
  • Repetition of the same word
  • Repetition of a word for emphasis