Nginx configuration help

Hi Can anyone help I am trying to add some rules to my .conf file within my nginx environment. However I cannot tell why this doesnt work… any help is much appreciated:

	# Block access to data folders
	location ~ /(soap|cache|upload|xtemplate|data|examples|include|log4php|metadata|modules|diagnostic|blowfish|emailmandelivery)/.*\.(php|pl|py|jsp|asp|sh|cgi|tpl|log|md5)$ {
	return 444;
	}