Re: [squid-users] Is this valid ?

From: Mark Andrews <mandrews@dont-contact.us>
Date: Mon, 03 Apr 2006 14:41:32 -0400

Peter Marshall wrote:
> Sorry .. I wanted to ask 2 questions
>
> 1. What does th $ do,
> 2. Why would you drop the *.
>
> If I had
> \.google\.*/talk*
> Would you still drop the * ???
That regex doesn't make sense and it's not clear what pattern you're
trying to block. If you're trying to block all URLs containing the string
".google.talk.", the regex in squid.conf is:

  \.google\.talk\.

If you're trying to block ".googleme.talk.", the regex could be:

  \.google.*\.talk\.

Notice that the dot before the asterisk is not escaped, since in this
case you do want to match any character (zero or more times as
is meant by the asterisk).

Regular expressions can be somewhat confusing, so I'd suggest you
play with the grep family of commands to get a better understanding
of how they look and work. Pay special attention to the egrep (extended)
grep command, as I believe squid's regex parsing is based on its behavior.

-- 
Mark Andrews
Senior Systems Administrator
IDT Entertainment Toronto
489 Queen Street East
Toronto, Ontario
M5A 1V1
CANADA
E: mandrews@dkp.com
P: 416-861-9269
F: 416-363-3301
Received on Mon Apr 03 2006 - 12:41:47 MDT

This archive was generated by hypermail pre-2.1.9 : Mon May 01 2006 - 12:00:02 MDT