I currently have this on my nginx configuration.

rewrite ^/category/.*([Ss][e3]x|p[o0]rn|[sS]candal|rape|adult) /not-found.html;
I just want it to make simpler and make sure that it will match uppercase and lowercase letters. I already read the nginx wiki here http://wiki.nginx.org/HttpRewriteModule but I can find what I need."~*" makes a regex case insensitive but I dont know how to use that in rewrites.