Find files under [directory] that match 'pattern_to_INCLUDE' in their names without descending into directories that match 'pattern_to_exclude' and 'another_pattern_to_exclude', then search for 'pattern' in those files
find [directory] -name "pattern_to_exclude" -prune -o -name "another_pattern_to_exclude" -prune -o -name "pattern_to_INCLUDE" -print0 | xargs -0 -I FILENAME grep -IR "pattern" FILENAME