You can use the -o flag as an OR condition with the find command.
The following command will output the contents of a [directory], excluding anything that matches the [path to ignore] (which can include wildcards).
find [directory] -path "[path to ignore]" -prune -o -print
If you pipe the results through grep, you can search for everything that matches the [pattern]. In other words, search for all files/directories in [directory] or it's subdirectories, excluding the [path to ignore], that match the [pattern].
find [directory] -path "[path to ignore]" -prune -o -print | grep "[pattern]"
