acl NoYahoo dstdom_regex -i au.(.*)yahoo.com
http_access deny NoYahoo

will block au.yahoo.com au.mail.yahoo.com au.this-is-not-really-yahoo.com
and any permutation without causing much of a CPU load.

If you want something a bit more specific, 

acl NoYahoo dstdom_regex -i au\.([a-z]+\.)?yahoo\.com 

will only block sites that start with "au." might or might not have some
subdomain in the middle, and end in "yahoo.com".  This acl WILL NOT match
au.this-is-not-yahoo.com.

Even though the page at
http://www.sitepoint.com/article/regular-expressions-php is PHP centric, it
looks to be a pretty good primer to Regular Expressions.

Chris

-----Original Message-----
From: Michael Thompson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 03, 2004 1:17 PM
To: [EMAIL PROTECTED]
Subject: [squid-users] Help with Regex


I dont quite understand the regex for matching domains.

I am trying to block access to au.yahoo.com and other au.yahoo.* websites.
All 
have the layout of au.something.yahoo.com and the main site of au.yahoo.com.

Can any one offer any pointers, or websites to help?

Reply via email to