Search and use find and replace - Computer (2024)

You can find and replace words in a document, spreadsheet, or presentation with Google Docs, Sheets, and Slides. You can also search within a file using the keyboard shortcut Ctrl + f (⌘ + f on a Mac).

Use find and replace in a document or presentation

  1. On your computer, open a document or presentation in Google Docs or Google Slides.
  2. Click Edit Search and use find and replace - Computer (1)Find and replace.
  3. Next to "Find," type the word you want to find. If you want to replace the word, enter the new word next to "Replace with."
  4. To see the next time the word is used, click Next. To go back to the previous word, click Prev.
  5. Optional: Narrow your search by using an option below.
    • Match case: Matches only words with the same capitalization.
    • Match using regular expressions: In Google Docs, matches words based on regular expressions.
  6. To replace the highlighted word, click Replace. To replace the word every time it’s used, click Replace all.

Use find and replace in a spreadsheet

  1. On your computer, open a spreadsheet in Google Sheets.
  2. Click Edit Search and use find and replace - Computer (2)Find and replace.
  3. Next to "Find," type the word you want to find, If you want to replace the word, enter the new word next to "Replace with."
  4. To search for the word, click Find. To see the next time the word is used, click Find again.
  5. Optional: Narrow your search by using an option below.
    • Match case: Makes your search case-sensitive.
    • Match entire cell contents: Searches for cells that are an exact match.
    • Search using regular expressions: Searches for cells that match a pattern.
    • Also search within formulas: Searches include formulas.
  6. To replace the highlighted word, click Replace. To replace the word every time it’s used, click Replace all.

Find and replace items using regular expressions

You can find and replace strings of text, including characters, numbers, words, or patterns with regular expressions in Google Docs and Sheets.

Find words using regular expressions

  1. On your computer, open a document or spreadsheet in Google DocsorGoogle Sheets
  2. Click Edit Search and use find and replace - Computer (3)Find and replace.
  3. Next to "Find," type the expression and click Search using regular expressions or Match using regular expressions.
  4. Click Find.

When you use Find and replace, your results may change based on which boxes are checked. The examples below are with "Match case" checked and "Match entire cell contents" (for spreadsheets) unchecked.

See an example

Search fordollar amounts

Note:This example only works with Google Sheets.

  • Enter into "Find": ^\$([0-9,]+)?[.][0-9]+
  • This string means a dollar amount where the first number is any number 0-9 or comma occurring zero or more times, followed by [.], followed by any number 0-9 repeated one or more times. This search could find numbers like: $4.666, $17.86, $7.76, $.54, $900,001.00,$523,877,231.56.

Search for U.S. zip codes

  • Enter into "Find": [0-9]{5}(-[0-9]{4})?
  • This string represents a U.S. zip code consisting of five numbers with an optional hyphen and four-digit add-on.

Search for names that start with a lowercase letter

Note:This example only works with Google Sheets.

  • Enter into "Find": ^[a-z].*
  • This string represents a cell with a lowercase letter followed by another character 0 or more times. This search would find: bob, jim, gEORGE, marTin.

Replace with regular expressions

You can replace parts of a regular expression with capture groups. You reference these capture groups in the "Replace" string using the format "$<group number>."Note:Capture groupsonly workwith Google Sheets.

See an example

The expression (\d*)/\d*/(\d{4}) matches dates such as 3/8/2015. This expression has two capture groups.

  1. (\d*) - Matches the month
  2. (\d{4}) - Matches the year

To replace each date matched with the above regular expression to the first date of the month, you would use the string "$1/1/$2." The date 3/8/2015 would be replaced with 3/1/2015.

Regular expressions

Google products use RE2 for regular expressions. You can see all of the RE2 expressions on GitHub.

If you want to search for a character that has a meaning in regular expressions, such as $, put a backslash in front of it. For example, to search for the $ character, you'd write \$.

Common regular expressions

Expression

Description

Example

Matches

Does not match

.

A period represents any character in the given position.

d.

do, dog, dg, ads

fog, jog

*

An asterisk after a character represents a search for that preceding character repeated 0 or more times.

do*g

dog, dg, dooog

dOg, doug

+

A plus after a character represents a search for that character displayed 1 or more times.

do+g

dog, dooog

dg, dOg, doug

?

The previous expression is optional.

do?g

dg, dog

dOg, doug

^

A caret must be placed at the beginning of a regular expression. It signifies the string starts with the character(s) or sequence placed after the caret.

Note: This regular expression only works with Google Sheets.

^[dh]og

dog, hog

A dog, his hog

$

A dollar sign must be placed at the end of a regular expression and signifies that the string ends with the character(s) or sequence placed before the dollar sign.

Note: This regular expression only works with Google Sheets.

[dh]og$

dog, hog, hot dog

dogs, hogs, doggy

{A, B}

The previous expression is repeated between A and B times, where A and B are numbers.

d(o{1,2})g

dog, doog

dg, dooog, dOg

[x], [xa], [xa5]

A character set indicates that just one of the given character(s) should occur in the current position. Usually, any characters are valid within brackets, including characters mentioned previously in expressions: [xa,$5Gg.]

d[ou]g

dog, dug

dg, dOg, dooog

[a-z]

A character set range signifies a search for a character within the given range of characters. Common ranges include a-z, A-Z, and 0-9. Ranges can be combined into a single range: [a-zA-Z0-9]. Ranges can also be combined with character sets (mentioned previously): [a-zA-Z,&*].

d[o-u]g

dog, dug, dpg, drg

dg, dOg, dag

[^a-fDEF]

A character set beginning with a ^ signifies a search for a character that is not within the given set.

d[^aeu]g

dog, dOg, dig, d$g

dg, dag, deg, dug

\s

Any white-space character.

d\sg

d g, d[TAB]g

dg, dog,

    Need more help?

    Try these next steps:

    Post to the help community Get answers from community members

    Visit the Learning Center

    Using Google products, like Google Docs, at work or school? Try powerful tips, tutorials, and templates. Learn to work on Office files without installing Office, create dynamic project plans and team calendars, auto-organize your inbox, and more.

    Search and use find and replace - Computer (2024)

    FAQs

    Search and use find and replace - Computer? ›

    Use the shortcut Ctrl+H or navigate to Home>Editing>Replace to reach the Find and Replace dialog box.

    How do I find and replace on my computer? ›

    Use the shortcut Ctrl+H or navigate to Home>Editing>Replace to reach the Find and Replace dialog box.

    What is the Find and Replace key on a computer? ›

    To use Find and Replace, use the shortcut Ctrl+H or navigate to Editing in the Home tab of the ribbon, then choose Replace.

    Where is the find and replace button? ›

    Go to Home > Replace. Enter the word or phrase you want to replace in Find what. Enter your new text in Replace with.

    How do I run a search and replace? ›

    You can also press Ctrl+H on your keyboard. The Find and Replace dialog box will appear. Type the text you want to find in the Find what: field. Type the text you want to replace it with in the Replace with: field, then click Find Next.

    Where is the Find and Replace option? ›

    Answer: The "Find and Replace" option is commonly found in the "Editing" or "Home" group in most word processing or text editing software. The "Find" option is used to search for a specific word, phrase, or character in a document. It helps in quickly locating and highlighting specific text in a large document.

    What is the shortcut for search and replace? ›

    When using a computer, "Ctrl H" is a keyboard shortcut that can be used for various purposes, depending on the application or program you are using. In most cases, it is used to bring up the "Find and Replace" dialog box, which allows you to search for a specific word or phrase and replace it with another.

    What is the F key for Find and Replace? ›

    Handy techniques for simplifying the tasks of searching within a document or web page. Using the Control key plus the "F" key is a common way to open a search feature in many applications. This can help you find a particular word or phrase within a web page or document.

    What is the shortcut key for search? ›

    Ctrl + E (or F) - Select search box. Ctrl + F (or F3) - Start search. Ctrl + L - Focus on the address bar. Ctrl + Mouse scroll wheel - Change view file and folder.

    Where is the Find and Replace tab? ›

    Press Ctrl+H to open the Find And Replace dialog box or find the command on Home > Editing 2.

    What is the replace command in computer? ›

    In computing, replace is a command that is used to replace one or more existing computer files or add new files to a target directory. Files with a hidden or system attribute set cannot be replaced using replace . The command lists all files that are replaced.

    Where is the replace button present? ›

    The Replace button is present on the View tab. 2. Thesaurus feature checks for the spelling and grammatical errors in a document. Ctrl + F key combination opens the Navigation pane.

    How to do search and replace on Windows? ›

    Try it!
    1. Select Replace or press Ctrl + H. ...
    2. In the Find what box, type the text you want to search for.
    3. Select Find Next to see where the text appears in your file. ...
    4. In the Replace with box, type the text you want.
    5. Select Replace to change the text or select Replace All to change all instances of this text in your file.

    What is the simple search and replace tool? ›

    Overview. The Simple Search and Replace extension for Google Chrome is a powerful tool that allows you to quickly search and replace text within input and textarea tags on web pages. With flexible customization options, this extension is a handy tool for efficiently performing text editing operations.

    What is the shortcut key for finding and replacing text in a document? ›

    Detailed Solution

    The correct answer is Ctrl + F. To access the Find and Replace dialogue box, press Ctrl+H or go to Home>Editing>Replace.

    Which keyboard command opens the Find & Replace window? ›

    The shortcut key for the “Find and Replace” dialog box in MS word is Ctrl + H. To open the Find and Replace dialogue box, use Ctrl+H or go to Home > Editing > Replace. This shortcut is used worldwide in all window computers.

    What is the shortcut for Find and Replace in Chrome? ›

    Use Ctrl+Shift+F to open Replace.

    Top Articles
    Top 7 Liquidity Providers of 2024 - Articles
    Crypto Market Cycles | FiCAS
    Bleak Faith: Forsaken – im Test (PS5)
    Junk Cars For Sale Craigslist
    Google Sites Classroom 6X
    Boggle Brain Busters Bonus Answers
    5 Bijwerkingen van zwemmen in een zwembad met te veel chloor - Bereik uw gezondheidsdoelen met praktische hulpmiddelen voor eten en fitness, deskundige bronnen en een betrokken gemeenschap.
    Hendersonville (Tennessee) – Travel guide at Wikivoyage
    Gameplay Clarkston
    Craigslist Dog Sitter
    Southland Goldendoodles
    Large storage units
    Gfs Rivergate
    General Info for Parents
    More Apt To Complain Crossword
    Magic Mike's Last Dance Showtimes Near Marcus Cedar Creek Cinema
    Tcgplayer Store
    Buff Cookie Only Fans
    Vanessa West Tripod Jeffrey Dahmer
    Race Karts For Sale Near Me
    Timeforce Choctaw
    Rogue Lineage Uber Titles
    Hesburgh Library Catalog
    Frank Vascellaro
    Bridgestone Tire Dealer Near Me
    Kokomo Mugshots Busted
    Where Do They Sell Menudo Near Me
    2016 Honda Accord Belt Diagram
    Terrier Hockey Blog
    When His Eyes Opened Chapter 2048
    Froedtert Billing Phone Number
    Citibank Branch Locations In Orlando Florida
    Three V Plymouth
    Sig Mlok Bayonet Mount
    COVID-19/Coronavirus Assistance Programs | FindHelp.org
    Cocorahs South Dakota
    Myrtle Beach Craigs List
    Does Target Have Slime Lickers
    Trending mods at Kenshi Nexus
    26 Best & Fun Things to Do in Saginaw (MI)
    Willkommen an der Uni Würzburg | WueStart
    American Bully Puppies for Sale | Lancaster Puppies
    Marcel Boom X
    Online College Scholarships | Strayer University
    Ronnie Mcnu*t Uncensored
    Guy Ritchie's The Covenant Showtimes Near Look Cinemas Redlands
    Game Like Tales Of Androgyny
    Festival Gas Rewards Log In
    Dcuo Wiki
    Taterz Salad
    login.microsoftonline.com Reviews | scam or legit check
    Latest Posts
    Article information

    Author: Patricia Veum II

    Last Updated:

    Views: 5958

    Rating: 4.3 / 5 (44 voted)

    Reviews: 83% of readers found this page helpful

    Author information

    Name: Patricia Veum II

    Birthday: 1994-12-16

    Address: 2064 Little Summit, Goldieton, MS 97651-0862

    Phone: +6873952696715

    Job: Principal Officer

    Hobby: Rafting, Cabaret, Candle making, Jigsaw puzzles, Inline skating, Magic, Graffiti

    Introduction: My name is Patricia Veum II, I am a vast, combative, smiling, famous, inexpensive, zealous, sparkling person who loves writing and wants to share my knowledge and understanding with you.