GOOGLE DOCS is the word processor offered by GOOGLE.
Word processors are used for extensive document creation which needs some of the basic tools for easy and smart work. One of such requirement is finding any word and replacing it with a new one.
It saves us a lot of time by simply replacing all the words.
In this article, we’ll learn about the different ways and solutions for replacing the word in many different ways.
WHY WE NEED TO REPLACE THE WORDS IN GOOGLE DOCS?
There can be many situations when we need to replace the words in the documents. Some are
- We need to replace a word which we have mistakenly used in the complete document.
- We have copied the data from somewhere and needs to replace a word which is present in the document.
- This feature can be used extensively for improving the formatting errors too such as deleting any extra spaces.
We’ll check the usage in the examples below.
OPTIONS FOR REPLACING WORDS IN GOOGLE DOCS
Luckily we have a ready to use function in the GOOGLE DOCS and we don’t need to use any tricks but to learn the usage of the option efficiently.
The name of the option is FIND AND REPLACE [ It does what it says ]
BUTTON LOCATION FOR FIND AND REPLACE IN GOOGLE DOCS
The option or button can be found under the EDIT MENU.
Choose EDIT MENU > FIND AND REPLACE
NOTE: THE EXCERPT HAS BEEN TAKEN WITH THANKS FROM WIKIPEDIA https://en.wikipedia.org/wiki/Swami_Vivekananda
HOW TO REPLACE A SPECIFIC WORD WITH THE NEW ONE IN GOOGLE DOCS
Let us learn the steps with the help of an example.
Before that let us brief the general steps.
STEPS TO REPLACE THE WORDS IN GOOGLE DOCS.
- Go to EDIT MENU and choose FIND AND REPLACE.
- A dialog box will open as shown in the picture below.
The description of the different options in the FIND AND REPLACE DIALOG BOX is given below.
|1||FIND : Enter the word which you want to search or replace.|
|2||REPLACE WITH: Enter the word which you want to put in place of the word you find. If you just want to find the word, this field will be empty.|
|3||MATCH CASE: Strict search. If you check this box, the case of the words will also be matched. e.g. DAY will not be equal to day.|
|4||MATCH USING REGULAR EXPRESSIONS: If you want to make the search using different expressions, such as all the words starting with da… like day, daisy etc. we need to put the expression in the FIND BOX  and put da* and use the checkbox . [It’ll be separately discussed in the same article in details]|
|5||IGNORE LATIN DIACRITICS: Ignore the diacritics.|
|6||REPLACE: Click the button to replace the selected found word with the new one .|
|7||REPLACE ALL: Replace all the found words with the new words.|
|8||PREVIOUS: Go to previous found word.|
|9||NEXT: Go to next found word.|
- Enter the word to be found in the FIND FIELD.
- Enter the word which you want to replace in the REPLACE WITH FIELD.
- As we put the word in the FIND FIELD, the found words will be highlighted.
- Click FIND, FIND NEXT, REPLACE or REPLACE ALL as per your requirement.
EXAMPLE 1: FIND THE WORD “BENGALI” IN THE GIVEN EXCERPT
Let us use the generalized steps as discussed above to find out the BENGALI word in the given excerpt.
- Go to EDIT MENU> FIND AND REPLACE or simply press [CTRL+H].
- In the FIND FIELD, enter the word BENGALI.
- The found word will be highlighted as shown in the picture above.
EXAMPLE 2: FIND AND REPLACE “BENGALI” WITH “INDIAN” IN THE GIVEN EXCERPT
Now, let us try to replace the found word with a new word in google docs.
- Go to EDIT MENU>FIND AND REPLACE or press CTRL+H.
- The dialog box will open.
- In the FIND FIELD enter “Bengali” and in the REPLACE WITH FIELD enter “Indian”.
- Click REPLACE.
- The Bengali word will be replaced with the Indian word.
- The process is shown in the animation below.
EXAMPLE 3: DELETE ALL THE WORDS WITH A SPECIFIC SPELLING
This kind of situation may arise frequently.
Although in our example, we don’t have any word which needs to be deleted, but let us delete “the” from the excerpt. [ Just for an example ]
- Go to Edit menu and choose FIND AND REPLACE or press CRTL+H.
- Enter in the FIND FIELD , the
- Enter in the REPLACE WITH FIELD- empty. [ keep it empty]
- Check the checkbox MATCH CASE.
- Click Replace All.
- All the “the” will be deleted.
Check the result.
Could you notice something unexpected??
The answer is YES!!!
Our steps removed all the “the” even from the word like Mother and grandfather. But we didn’t want that.
So let us amend our search a bit.
We want to replace only the “the” which is a standalone word.
So, enter (space)the(space) in the find and our result will be as per expectations.
Repeating the steps, we get the following result.
One more improvement can be done by replacing (space)the(space) with a (space) so that the problems like ANDRELIGIOUS doesn’t occur as shown in the picture above underlined with a red line.
After removing this error too, the final result is shown below.
THE DIFFERENT STEPS AND ERRORS ARE DISCUSSED AS THE FIND AND REPLACE WITH FIELDS ARE VERY IMPORTANT AND SENSITIVE IF YOU ARE HANDING THE DOCUMENT WITH MULTIPLE PAGES. ONLY THE REQUIRED REPLACEMENT SHOULD TAKE PLACE
HOW TO FIND AND REPLACE PATTERNS IN GOOGLE DOCS?
After we have learnt to remove or replace any word with a new word, it is now time to find and replace or remove the words containing the specific conditions like patterns, or presence of few characters etc.
If you remember the FIND AND REPLACE DIALOG BOX, the second checkbox is MATCH USING REGULAR EXPRESSIONS , will be used in such cases.
We need to always check this if we want to evaluate this.
There are many expressions and their terminology which can be referred here https://github.com/google/re2/blob/master/doc/syntax.txt
These expressions need to be put in the FIND and it’ll find all the patterns or words or characters fulfilling the conditions given in the expression.
The expression list is exhaustive but we’ll learn only the frequently used expressions here.
|SPECIFIC CHARACTER OPTIONAL AT SPECIFIC POSITION||REPLACE THE OPTIONAL LETTER WITH A . [PERIOD] e.g. d.y will search for day,doy,dgy etc.|
|REPETITION CHECK OF SPECIFIC CHARACTER||PLACE + AFTER THE CHARACTER TO BE CHECKED e.g. di+m will search dim, diim, diiim and so on.|
|MULTIPLE PRESENCE OR ABSENCE OF A CHARACTER||PLACE A * AFTER THE CHARACTER TO BE CHECKED e.g. pra*y will find pry,praay,praaay etc.|
|FIXED CHARACTER SET||PLACE THE CHARACTERS IN  e.g. [a,b] will enlist all the words containing a or b or both. Different conditions can be put in that. e.g. d[a,f]y will enlist day and dfy.|
|\s||ALL THE WHITE SPACES WILL BE HIGHLIGHTED e.g. d\sy will show d y which is including the space|