^(?!facebook).*A blacklist won't allow items that match and a whitelist only allows items that match. Blacklists include by default and whitelists exclude by default.
Since the regex needs to match to be included - it is, by definition, a whitelist. It excludes by default anything that doesn't match. It just so happens the net being cast is so wide as to be "all except ____" where a whitelist is usually seen as "none except ____".
That regex will only positively "match" non-facebook items, and will only block facebook if implemented in a whitelist.
I'm just playing the straight man to your joke. Of course it's functionally a blacklist: That's what you asked for.
My comment is not a joke but a challenge to the parent ... that they are wrong
Yes whitelist are safer ... but whitelists can be cumbersome to generate/maintain and slow you down at runtime ...
On reddit let this slide , but here we have to correct the flawed thinking.
You cant run from engineering problems without consequece
So now we have graduated to course 202: how to make a blacklist safe?
Check context, and restrict access
ftfy