Re: squid regex

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Luca Ferrari said:
> Hi,
> I cannot understand a thin about squid regex: are they regex in the "unix"
> meaning of the term? For example, the regex .rar will intercept only
> ".rar"
> or everything that ends with .rar, since there is the starting dot that
> catches any character?

RegEx can, and do, change with each application, however, most try to be
like Perl or C RegEx.  "UNIX" RegEx also depends on the shell and program,
like grep, that you are using.  So, to shorten your answer, you will need
to learn the Squid RegEx, and that may even vary in the what you are
trying to do with squid.

I have something a line like this for catching Windoze file extentions:
acl WinExecs url_regex -i \.exe \.bat \.dll \.zip \.gz \.scr \.rar \.wmv
\.mov
http_access deny WinExecs

It works pretty well.  I put the \. in there so it doesn't trigger on
something like executive.html but would still trigger on
blah.executive.html
*shrug* can't protect them all from teh entire world I guess.

Maybe \.rar$ would be a better RegEx, but then what if the URL ends like
.rar?blah=blah... I'm not going to test it for you, you can do that.

  Maybe that is what you are looking for?

--
Scott
-
: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Newbie]     [Audio]     [Hams]     [Kernel Newbies]     [Util Linux NG]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Device Drivers]     [Samba]     [Video 4 Linux]     [Git]     [Fedora Users]

  Powered by Linux