RE: [squid-users] Help with Regex

From: Chris Robertson <[email protected]>
Date: Wed, 3 Nov 2004 13:38:19 -0900

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:mike@thompsonmike.co.uk]
Sent: Wednesday, November 03, 2004 1:17 PM
To: squid-users@squid-cache.org
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?
Received on Wed Nov 03 2004 - 15:38:26 MST

This archive was generated by hypermail pre-2.1.9 : Wed Dec 01 2004 - 12:00:01 MST