The contents property is what it sounds like you are asking for. There is a method to have Windows 7 Search look at contents of more file types than it does, but sometimes the method doesn't put the proper setting for searching the file type in the Windows
Registry, making for a puzzle of what is wrong in the Registry. Anyhow, here are some of my notes. The post after this one lists common free alternative software for searching, with various and differing capabilities.
content: To search for files with text containing the word “goat” or a word that begins with “goat”, enter content:goat.
Beware that attempting to search with content:”goat herd” can give results that have the two words, but not necessarily together.
Any sort of file that contains text, such as a Microsoft Word doc file or a Microsoft Excel xls file, can have its contents searched, however not all such files are set to be searchable by default, such as eml files.
limitations, content: The special search syntax symbols (=, >, <, >=, <=, ~!, <>, and ..) do not work.
However, the special symbols (~=, ~<, ~>, $<, and $=) work (except for some crazy reason, only when searching in folders that are not indexed), and the minus sign, and special words (AND, OR, and NOT) do work. Other limitations: we can't search in
a case-sensitive way, and we can't search the contents of extensionless files. Wildcard usage (* and ?) requires content:~"*put search text here*" (which again, only works when searching in folders that are not indexed).
about those special symbols:
~= tilde and equals sign: gives results for items that have the search text anywhere in the searched property, regardless of appearing at the start, within, or at the end of other text.
Two tildes ~~ works same as the tilde and equals sign.
~< tilde and less-than sign: gives results for items whose searched property begins with the search text.
~> tilde and greater-than sign: gives results for items whose searched property ends with the search text. When using ~> in a contents search, keep in mind that if the end of the text in the file is followed by an empty line (but no
spaces), that means that an unseen non-printing character is the last character, and Windows 7 Search can not search for that character.
$< dollar sign and less-than sign: gives results for items whose searched property contains any words (or other text strings) that match or begins with the search text.
By default, Windows 7 Search already searches that way without $<.
For example, name:$<rat gives results no different from name:rat. If the “Find partial matches” setting (in the Folder Options dialog box, Search tab) has been deactivated, then $< would be necessary to search that way. With $<,
the use of quotation marks put around the search text has their default effect of treating separate text strings (words) as a list, and not as a single string (or phrase).
$= dollar sign and equals sign: gives results for items whose searched property contains any words (or other text strings) that exactly match the search text.
With $=, the use of quotation marks put around the search text has their default effect of treating separate text strings (words) as a list, and not as a single string (or phrase).
Two dollar signs $$ works the same as the dollar sign and equals sign.
" " quotation marks: By default, the “Find partial matches” setting is active (in the Folder Options dialog box, Search tab), which means that results include items with words that begin with the characters of the search text. If quotation marks
are placed around the search text, then the effect is the same as deactivating that setting, and the results only include items with words that are the same as the search text. (Some special syntax can override the effect: ~=, ~!, ~<, ~>, and $<.) When
quotation marks are placed around two or more strings of text (words) separated by spaces, by default Windows 7 Search treats the strings as a list. So, for example, name:"one two three", finds items whose names contain every string in the list, in any order.
[Update: bizarrely, the mostly equivalent property called "filename" does enforce order, actually, while "file" and "name" do not.] The quotation marks are not sufficient to treat the list as a single string (or phrase). Treating
the list as a single string requires special syntax symbols (=, ~=, ~!, <>, >, <, >=, <=, ~<, and ~> work, but $< and $= do not) to precede the first quotation mark. Unfortunately, none of the working syntax symbols allow searching for a phrase that appears
anywhere in the property text except for ~=, and ~= includes items that have other text immediately before or after the search text. For example, content:~="goose pimple" would include items whose content text had “bgoose pimpleq”. If only content with “goose
pimple” as a distinct phrase was desired, then to get results closer to that desire (but not completely successfully), enter content:(~="goose pimple" "goose pimple"). That search would, however, include items that did not have the distinct phrase but instead
“bgoose pimpleq” if the content text also had separate instances of “goose” and “pimple”.
[Update: apparently special search symbols such as ~= don't work with the content property when searching in indexed locations, but do work when searching in non-indexed locations.]
How to search for symbols or text containing symbols (non-alphanumeric):
Most non-alphanumeric symbols (such as $ or &) that appear on a computer keyboard need special search syntax to be successfully searched for.
The only exceptions are _, /, and . The special syntax used can not be $< or $=.
If special syntax is not used when attempting to search for symbols that require it, the symbols are interpreted as unspecific spaces, separating whatever search text is to the left and right.
Of the symbols that need special syntax, some also need the search text to be within quotation marks.
The symbols that do not need quotation marks are ` ! @ # $ % ^ & - + [ { ] } ; ’ , . * | : ?.
The symbols that do need quotation marks are ~ ( ) = " < >.
For example, to search for items whose name contains g=b, enter name:~="g=b".
The quotation mark itself is a special case, needing to be entered doubly as "" for each single desired ".
Because of the general effects of quotation marks, the decision to use quotation marks when they are optional depends on how you want your search to work.
Searching for text with _, /, or \ gives unexpected results when the property text has more than one character to the left of the symbol, and the search text has less characters than the property text does to the left of the symbol.
For example, name:x_bun would give items named fix_bun. The effect is not prevented by putting the search text within quotation marks or by using $< or $=.
The path and folder properties are special exceptions in that putting search text with \ within quotation marks prevents the effect (\ is for separating directories in paths).
For example, path:"ey\now" would not give items that only had that text within hey\now.
Searching for only a pair of square brackets with or without spaces [ ] requires that quotation marks be put around them, as in name:~="[]". If the pair of square brackets has no spaces between them and are not within quotation marks then they
are interpreted with special meaning by Windows 7 Search, referring to items whose specified property is empty of text.
How to allow searching of contents of more file types:
Not all file types are searchable by their contents by default with Windows 7 Search.
For a file type to be searchable that way, its file extension must appear in a special list (in the Control Panel, Indexing Options, click the Advanced Options button, and click the File Types tab in the box that appears) and have a checkmark showing.
Click the box beside the file extension in the list to place a checkmark there.
If the desired extension does not appear in the list, then type it into the box at the lower left and click the “Add new extension” button.
Given that the extension is in the list, click on it and see what setting appears under “How should this file be indexed?”; if necessary, click to put a dot beside “Index Properties and File Contents”.
Regardless of whether or not you search within the indexed area, and whether or not you want to have a file type set for indexing, those Indexing Options settings are required for Windows 7 Search to be capable of searching the contents of more file
types. For any new setting here, Windows 7 has to rebuild the index, and that can take many minutes.
File extensions can not be removed in the Indexing Options settings, but there is a way to make Windows 7 remove them.
Run Registry Editor, click HKEY_CLASSES_ROOT, find the file extension in the list that appears, rightclick on it, and click Delete in the menu that appears.
Upon the next startup of the computer, that deleted file extension will not show in the Indexing Options.
(Do not remove file extensions that you have not added yourself, because Windows 7 needs to have them in the Registry to use them for their purposes, not just for Windows 7 Search.)
Windows 7 Search peculiarity with periods:
If an item has property text with any instances of single letters followed by periods, and no spaces between each period and the next such letter, then search text with those letters together with no periods will give that item in the results.
For instance, if an item has a.c.e. in its content, then content:ace will find that item.
The effect does not happen if any special search syntax symbols such as ~= are used.