The tool ‘textpipe’ will do it for you, and if you’re not so technically inclined, it will make life easy for you as well. The interface is a bit strange, but you will get the hang of it quickly.
You can give it a list of strings (text) to match, and it will return all the files with that text in there.
http://www.datamystic.com/textpipe.html
They have a 30-day free trial, so you can do what you need.
The “Lite” and “Standard” versions are both still extremely powerful tools, and really, they’ll all do this particular task you want. The “pro” version is quite expensive, but total overkill for what you’re doing anyway.
The filter you’d want is ‘extract lines matching pattern list’., or ‘extract matches by line’.
There’s a backup mode, but remember to make a backup of your files first when doing operations on 4000 at a time.
Hope this helps 