Find file name which contain a centrain string using grep and find

If you only want to find the file names that have a certain string without showing the matching line:

root@server:/# find . -type f -print0 | xargs -0 grep -l "string"

and you want to exclude file name that containing certain string:

root@server:/# find . -type f -print0 | xargs -0 grep -l "string" | grep -v "string2"