The platform doesn't offer the ability to search the content at present AFAIK.
Apex doesn't include the language features that would allow binary data to be examined and if it did you would need to write a very large amount of code to deal with the many formats that attachments can be in (and that code could easily run into governor limits).
(The .docx format is XML content that Apex could parse but the overall set of folders and XML files are zipped and Apex doesn't expose any unzip/zip APIs.)
Pushing the attachments out to an external indexing service (that supports all the formats you are interested in) and making web service calls to that service to do the searching would be a way to go. But from a quick Google I didn't find a compelling offering either as a ready to use service or as a toolset that you cold setup yourself on e.g. Heroku.