How do I search all contents including code from admin? I am a Drupal newbie and I am frustrated in my search for methods that allow admin searches of code in node content fields ie CSS classes.  I'm baffled that there is not a built-in default way to help admins search content like this.

I have looked at many projects for Drupal 7 and Drupal 8 and only a few Drupal 7 modules looked like they could have helped. None of what I have read for Drupal 8 appears to offer code search.

The documentation I have read, and the module I found are the following.


https://www.drupal.org/project/admin_views (D7)
http://drupal.org/project/scanner (D7)
https://www.drupal.org/docs/8/core/modules/search/overview
https://www.drupal.org/resource-guides/content-administration
https://www.drupal.org/project/search_api
https://www.drupal.org/docs/8/modules/search-api/getting-started/common-pitfalls
https://www.drupal.org/project/find_content (D7)
https://www.drupal.org/node/384486
For a quick solution, you can edit the View that powers the Content page (or create a new View, edit a different View, etc), and add the body field as an exposed filter. Combined with a LIKE operator that should give you reasonably good results (though it will possibly depend on what input format you're using).

If you want something more like what you described, i.e. something that searches multiple fields at once, you could install the Search API module, create a results View, and add a combined filter that will search across all the desired fields. This approach takes a bit more effort, but might give more accurate results than the first one, especially if you use (for example) Solr as the backend.