Advanced search in a Word document

Hello friends. Did you know that you can search in Word very precisely: taking into account case, style, font, and also taking into account wildcards, and more? In this article, I will tell you how to use it correctly so that the search result is error-free.

Advanced Search

Searching a Word page is performed using a function called “Find”. You can find out more about it on the “” page.

If you have ever searched for any text in the body of a document, then I think you have noticed that the results may not be accurate. For example, when searching for the word “children,” Word will offer you all the options that are derived from the main query: “childrenNA,” “kids.”

And in order to find a certain specific word, for this in text editor Word has an advanced search. Through it you can find a more accurate text - taking into account the register, by exact match, you can find a word not only by content, but also by the way these words are formatted, as well as by other conditions. How to use it, you ask?

Open the “Home” tab, find the “Editing” section and click “Find”. At the bottom of the search window that appears, click “More”. An advanced search window will open.

Look how many different search options there are. Now I will tell you about the main ones:

  • “Direction” - in which direction the search will be performed in the Word document.
  • “Forward”, the search will move down from the cursor to the end of the document.
  • “Back” – from the cursor up to the beginning of the document. In this case, searches will not be carried out in links and footers.
  • If you select “Everywhere,” Word will look for words in both headers and footers.

Search by words

We continue to explore the advanced search options.

“Match case” means whether Word will take into account whether the word is typed in CAPITAL or small letters when searching for words. For example, in the search we type a word with a Capital letter, then the search result will be only the word with a Capital letter.

“Only whole words” - with this item we tell Word that we are interested in searching for this particular word. For example, in the search bar we type the word “dad”, then the search will find those words that specifically contain “dad”, and words such as dad, daddy, daddy will be skipped.

“Wildcards” means that we will use special characters to search for words. For example, we type in the search “walls?” and we are looking. Word understands that instead of a question mark, you can substitute any letter: wallA, walls, wallU, etc. The search result will be all similar words.

You can find out what wildcards there are on the page “Wildcards in advanced search in Word.”

"Pronounced as" - in English language There are many words that sound the same, but they are written differently. Although there are such words in the Russian language, this function does not work for our language.

The “All word forms” function searches for all word forms.

Search a Word document by format

The “Format” button will open a list of formats by which you can find text. By the way, you can choose not just one format, but several.

The “Special” function also contains a list of functions.

Search and replace

In Word, using the advanced search, you can not only find text, but also replace it with another one.

To do this, open the “Replace” tab. Next, in the find line, indicate the word that we want to change. For example, replace the word “one” with the word “other”. This means that the next step in the “Replace with” field is to write what you want to change the text to. We set the correct Search Parameters and click on one of the buttons: Replace or Replace All.

Conclusion

In my opinion, there is nothing too complicated about this. On the contrary, it is quite convenient that Word has a more flexible search setting, which allows you to more accurately specify search parameters. I hope you liked it and I was able to help you. Let me remind you once again that I have an article about “Search in Word”, I advise you to look at that too.

Computer cheat sheets from Konstantin Fest
(based on Windows 7 Ultimate and MS Office 2013)

How to use wildcards
signs for replacing and deleting text

I was asked to tell you how to quickly remove from Microsoft document Word all links.

I think the need to remove links from a document in itself rarely arises, but this example can very well demonstrate the use of the tool " Replacement", which can save a lot of time when working with documents.

So we have a document that has a lot of links. We simply need to remove them throughout the document so that they don’t exist:

The Replace tool allows you to search for specific sample text in a document and replace it with another specified text, or with “blank space,” which is the same as deleting the original text.

Of course, with an invisible paragraph sign (after all, each link is located on a new line, i.e. after it there is a paragraph translation). You can see this by turning on non-printable characters:

We will use these “hooks” to automatically find all the links in the document.

To do this, go to the menu " Home - Replace" and in a new window on the tab " Replace"First of all, check the box" Wildcards". This will allow us to use special characters for our link search (click on the image to open it in full size):

Now enter the following line in the “Find” field:

http:*^13

Let's look at it in more detail.

http: are the characters with which each link begins.

* is a special Word sign that means: any sequence of characters.

^13 - this is a special Word sign that corresponds to paragraph translation.

In other words, this line means the following: search for any sequence of characters that starts with http: and ends paragraph translation .

It seems that this is what we need ;)

Go ahead. Below the "Find" field in the window there is a field " Replaced by". In theory, you should enter text there with which all found fragments will be replaced. But since we just want to delete them, we leave this field empty.

Click the button in the window Replace all", after which a search and replacement is performed in accordance with the parameters we have specified, and all links simply disappear from the document:

But it’s too early to relax. The document also contains other types of links that begin with "www". They were, of course, not deleted:

To find and remove them we use hooks www And space, because such links end with a space that precedes the hyphen. Therefore, in the “Find” field, enter the following line:

Please note again that after the asterisk Necessarily you need to enter a space! You can't see it, but it's there.

Now, after clicking the "Replace All" button, links of this type will also be removed from the document.

Using wildcards and codes in the Replace tool is a very powerful feature that allows you to find and replace/remove a wide variety of text fragments.

Full list wildcards and codes can be found on the Microsoft website:

And don’t forget about the opportunity to order the “Anti-Kettle” video course, which turns beginners into confident computer users:

Search by documentWord carried out by the “Find” function. See the article “Searching in a Word document”. But you can search in Word not only by words, but also by case, font, style, using wildcards, etc.
If there are many similar words in the text, then you will need to search among them in the search results. To find one specific word, there is Word advanced search. In it you can find data using more accurate, detailed data - taking into account case (lowercase or capital letters), a word by complete match, finding a word not only by text, but also by the design of this word, by other conditions.
So, on the “Home” tab, in the “Editing” section, click the “Find” button. At the bottom of the window that appears, click on the “More>>>” button. An advanced search window will appear. Let's consider it.
“Direction” is a search in a Word document, the direction of the search in the document. For example, if we select the “Forward” direction, the search will proceed from the cursor only down the document. If we select "Back" - up the document. In these cases, links and footers will not be searched. If we select the “Everywhere” search, then Word will search everywhere in the document, incl. in footers, in links.
Search by words inWord.
“Case sensitive” means that if we write a word in small letters in the search bar, then Word will search only for words written in small letters. If we write a word with a capital letter, it will search for words written with a capital letter.
“Only whole words” - only the word that was written in the search bar will be searched. For example, we wrote the word “mom” in the search bar. A simple search will bring up the words - mom, mommy, mommy, etc. All words that contain the word "mom". An advanced search will only return the word “mom.”
"Wildcards" are characters that represent specific meanings in a word. For example, we checked the box functions Word "Wildcards", and in the search bar they wrote “S?lo”. This means that you need to find all the words with these letters, but the second letter (where the question mark is) can be anything. The search found the following words: lard, village.
Let's look at a few wildcards.
WildcardsWord.
? (question mark- any letter.
*(star)– several characters. For example, they wrote - “L*s”, he will find - elk, salmon.
(square brackets)- will find all words with characters specified in square brackets. For example, if you wrote “S[ae]lo” in the search bar, it will find – lard, village. [ - ] (letters separated by dashes, in square brackets)– will search for all words with letters that are written in a range in square brackets. For example, he wrote “S[a-e]lo”, he will find - lard, village, etc.
[!] (exclamation mark in square brackets)– will search for words except words with a letter with an exclamation point. They wrote “S[!a]lo” in the search bar, and it will find a village. And the word “Salo” will not be shown in the search results, even though this word is in the text, etc. We wrote a condition in the search bar so that words containing the letter “a” after the letter “C” would not be searched.
>(greater than sign)– it’s like an arrow, it shows which part of the word to look for. This sign will search for words that end with the letters specified in the search. For example, they wrote it like this, “(ist)>”. Finds and displays in the search results the word - leaf, p.ch. it ends in "ist". But the word “source” will not show.
<(знак меньше) – will search for words that begin with the letters we specify in the search. For example, we wrote "<[лис]». Найдет слово – лис, не будет искать и не покажет слово, полис.
@ (“dog” – in colloquial Russian)– repeating characters. For example, they wrote “S@ypat”. He will find the word pour.
{ n) (curly brackets with number n)– put a number (n) in curly brackets, which will indicate how many repetitions of the specified symbol you need to search for words. For example, they wrote it like this, “*e(2)”. Here we have specified a search condition - to look for words that have several characters (*), specifically the letter “e”, which will be repeated 2 times in words. Word found such a word - “bolder”. And the word “in short” will not show up in search results, huh. there is only one letter "e" in it.
{ n,) (curly bracket with numbern and a comma) – write the number of repetitions of characters from the specified number or more. For example, they wrote “*e(2,)”. The search yielded the words - be brave, snake eater.
To put square brackets in Word, you need to switch the keyboard to the English layout. Square brackets are on the buttons of the Russian letters “х” and “ъ”.
Curly braces in Word We place them like square ones, but first press the “Shift” key.
Search function "Pronounced like" allows you to find words that are spelled differently but pronounced the same. This feature only works with English text.
Function "All word forms" searches for all word forms, for example, verb tenses, etc.
Search a Word document by format.
In the Find and Replace dialog box, click "Format" button located at the bottom of the window. Select the one you need from the list that appears.

Formats can be combined. For example, find text written in bold italic with a non-breaking space, etc.
Special button also has a list of functions.
Search and replace inWord.
In Word you can not only find with an advanced search, but also replace. In the “Find and Replace” dialog box, go to the “Replace” tab, and in the “Replace” line we write detailed replacement conditions.
How to delete a misspelled word in Word that we entered by accident, see the article "

The other day I was engaged in all sorts of sexual perversions with the texts of the latest medical affidavits in MS Word. And I had to look for and replace a bunch of all kinds of obscene language and gibberish, because the authors, for the most part, are not at all poorly trained in the Russian language (everyone strives to write in English in Cyrillic, etc.) and they do not know how to format texts in a readable way. There were a lot of things that needed to be replaced and simply changed, and the standard well-known search tools built into the editor were no longer enough, so it was necessary to resort to using . But as? The magical Word program started swearing dirty at the masks I had previously known. As always, Google came to the rescue. After doing a little digging, I discovered that the brilliant little MS Office writers went their own way here too, calling such expressions wildcards and slightly changing their syntax. In general, you can figure it out.


It turned out to be quite simple (I have Office 2007, but I think it will be true for previous versions, except that there will be minor differences in the names of the items, but you’ll figure it out, I believe;)). And, by and large, there was no need to go looking anywhere. Along with the immediately visible ones, if you call up the “Search” (Ctrl+F) or “Search and Replace” (Ctrl+H) window in Word, place the cursor in the “Find” field and click the “More” button, and then “Special” ", special characters, there is another option, which is discussed below. It turned out to be quite simple (I have Office 2007, but I think it will be true for previous versions, except that there will be minor differences in the names of the items, but you’ll figure it out, I I believe ;)). And, by and large, there was no need to go looking anywhere. Along with the immediately visible ones, if you call up the “Search” (Ctrl+F) or “Search and Replace” (Ctrl+H) window in Word, place the cursor in the “Find” field and click the “More” button, and then “Special” ", special characters, there is one more option, which is discussed below.
First, about standard search masks:
^? - any sign
^# - any number
^$ - any letter
^p — Paragraph mark (¶) (if Wildcards option is selected, replace with ^13 )
^t - tab character (→) (if Wildcards option is selected, replace with ^9 )
^+ — em dash (—)
^= — en dash (-)
^^ — cap sign (^)
^l - forced line break (symbol ↵ or 0xBF), this happens if you press Shift+Enter (if the “Wildcards” option is selected, replace it with ^11)
^n - column break (if the Wildcards option is selected, replace it with ^14 )
^12 - Section or page break (when replaced, adds a page break)
^m - Force a page break (also used to find and replace section breaks if the Wildcards option is selected)
^s - non-breaking space (º) (Ctrl+Shift+Space)
^~ — continuous hyphen (≈)
^- — soft transfer (¬)
Now let’s move on to the “Replace with” field, two specific options appear here:
^& — search text
^c — clipboard contents
How can this be used? For example, let’s say you need to find the text “Achtung!” and "Achtung."? paint it green and replace it with “Achtung, minen! "(precisely red). Moreover, in the text you simply have the word “achtung” with a small letter, which does not need to be changed. Solution:
Write in red “minen! "and cut to clipboard
Find (by checking the “Match case” checkbox): Achtung
Replace with (move the cursor to this field and click the “Format” button, then select “Font” and there is green):
Now Find: Achtung^?
Replace with: Achtung, ^c

With this everything is really simple and clear. And if necessary in a huge list of literature like
Reynolds J. V., Murchan P., Leonard N. et al. High-dose interlenkin-2 promotes bacterial translocation from the gut // Brit. J. Cancer.-1995. -Vol. 72, N 3. - P. 634-636.
bring everything back to normal
Reynoldsº J.V., Murchanº P., Leonardº N. etº al. High-dose interlenkin-2 promotes bacterial translocation from the gut // Brit. J. Cancer.º— 1995.º— V.72(3).º— P.º 634-636.
What should I do? Editing each line by hand will be very time-consuming and tedious. But this can also be done by search and replace.
If you check the “Wildcards” checkbox in the search and replace window, the contents of the “Special” button for the “Find” field will take a slightly different form:
? - any sign
[ - ] - sign in range
< — в начале слова
> - at the end of a word
() - range
[!] - Not
(; ) — number of occurrences
@ - previous 1 or more
* - any number of characters
And for the “Replace with” field an additional item will appear
\n is the desired expression
How to use it? Just. I'll start almost in order.
? and * are essentially the same thing, but the expression ??sa for search will mean “[space] wasp”, “scythe”, “fox” and a bunch of other things containing two characters ahead of “sa”. And the expression *sa will highlight the entire text for you from the position of the cursor in the text to the first “sa” that comes across, including “[cursor] An animal with number 25 ran across the field, it was a fox.”
The @ symbol is close in meaning to the previous ones. Here I didn’t have enough imagination for an example, I’ll borrow from the small ones: lo@t will help you find “lot” or “loot”, ful@ will help you find “ful” or “full”, etc. :)
Almost from the same opera characters< и > : <ок will help you find everything “around”, and ok>- all kinds of “shock”.
The expression will help you find any letter of the English alphabet in upper case, and any letter in both Russian and English. The expression (;) is also used inextricably with this. It looks like this: let's say you need to find all words that start with a capital letter and are 4 to 5 letters long and end with a question mark. The solution would be to search for them using the following mask:
{1;1}{3;4} \?
that is, find one capital letter and 3 or 4 more lowercase letters following it plus a question mark. There is one small subtlety here - since the symbol “?” is used as a wildcard, then in order for the search to perceive it as a question mark, and not any character, you need to put “\” in front of it. If you need to find the “\” character itself in the text, it will look like \\ , well, etc.
Using [!] you can find, for example, everything except capital letters: [!A-Z] .
Now about the most interesting search operator - () . With its help, you can find several different expressions and group them using the \n operator. A simple example: let’s say you need to replace “Last Name AND O” with “I.O.ºLast Name” throughout the text. Solution:
Find: ({1;1}{2;11} ) ({1;1} ) ({1;1} )
Replace with: \2.\3.^s\1
That is, each expression in brackets in the Find field corresponds in order to the \n operator in the Replace with field.
Now I think you can handle the task given above yourself;)