You can do whatever filtering you want using the url_rewrite_program directive:
http://www.squid-cache.org/Doc/confi...write_program/
Just write for example a little perl script that returns some local "blocked" page based on regular expressions against the requested URL.
BTW, some elaborate squid blocking software like squidguard is using this "hook".