grep -i "search_string" /search/dir -r --include=*.txt
If want to search in different file types, just use:
grep -i "search_string" /search/dir -r --include=*.txt --include=*.cpp --include=*.h
Search string1 or string 2 with pipe:
cat file | grep -E "string1|string2"