- \ - The
+ | \ - The
"escape" character denotes that the
following character should be taken literally. This is used where
one of the special characters (e.g.
- [ ] - Characters
- enclosed in brackets will be matched if any of the enclosed
- characters are encountered. For instance, [ ] -
+ Characters enclosed in brackets will be matched if any of the
+ enclosed characters are encountered. For instance, "[0-9]" matches any numeric digit (zero through
nine). As an example, we can combine this with "+" to match any digit one of more times:
@@ -168,8 +156,8 @@ body {
- ( ) - parentheses
- are used to group a sub-expression, or multiple
+ | ( ) -
+ parentheses are used to group a sub-expression, or multiple
sub-expressions. |
@@ -178,7 +166,7 @@ body {
- | - The
+ | | - The
"bar" character works like an
"or" conditional statement. A match is
successful if the sub-expression on either side of
- /.*/banners/.* - A simple example that uses the
- common combination of "." and "*" to denote any character, zero or more times. In
- other words, any string at all. So we start with a literal forward
- slash, then our regular expression pattern (/.*/banners/.* - A simple example that uses
+ the common combination of "." and
+ "*" to denote any character, zero or more
+ times. In other words, any string at all. So we start with a literal
+ forward slash, then our regular expression pattern (".*") another literal forward slash, the string
"banners", another forward slash, and lastly
another ".*". We are building a directory
@@ -217,16 +205,17 @@ body {
And now something a little more complex:
- /.*/adv((er)?ts?|ertis(ing|ements?))?/ - We have
- several literal forward slashes again ("/"),
- so we are building another expression that is a file path statement. We
- have another ".*", so we are matching
- against any conceivable sub-path, just so it matches our expression.
- The only true literal that must
- match our pattern is adv,
- together with the forward slashes. What comes after the "adv" string is the interesting part.
+ /.*/adv((er)?ts?|ertis(ing|ements?))?/ - We
+ have several literal forward slashes again ("/"), so we are building another expression that is a
+ file path statement. We have another ".*",
+ so we are matching against any conceivable sub-path, just so it matches
+ our expression. The only true literal that must match our pattern is
+ adv, together with the forward
+ slashes. What comes after the "adv" string
+ is the interesting part.
Remember the "?" means the preceding
expression (either a literal character or anything grouped with
@@ -238,15 +227,14 @@ body {
"QUOTE">"s" . The "|" means
"or". We have two of those. For instance,
"(ing|ements?)", can expand to match either
- "ing" OR "ements?".
- What is being done here, is an attempt at matching as many variations
- of "advertisement", and similar, as
- possible. So this would expand to match just "adv", or "advert", or
- "adverts", or "advertising", or "advertisement", or "ing" OR "ements?". What is
+ being done here, is an attempt at matching as many variations of
+ "advertisement", and similar, as possible.
+ So this would expand to match just "adv", or
+ "advert", or "adverts", or "advertising",
+ or "advertisement", or "advertisements". You get the idea. But it would not
match "advertizements" (with a "z"). We could fix that by changing our regular
@@ -254,8 +242,8 @@ body {
"QUOTE">"/.*/adv((er)?ts?|erti(s|z)(ing|ements?))?/" , which
would then match either spelling.
- /.*/advert[0-9]+\.(gif|jpe?g) - Again another
+ /.*/advert[0-9]+\.(gif|jpe?g) - Again another
path statement with forward slashes. Anything in the square brackets
"[ ]" can be matched. This is using
"0-9" as a shorthand expression to mean any
@@ -305,8 +293,8 @@ body {
@@ -603,22 +528,22 @@ body {
"actions-file.html#ACTIONS">actions and filters to any given URL can be complex,
and not always so easy to understand what is happening. And sometimes
- we need to be able to see
- just what Privoxy is doing.
- Especially, if something Privoxy is
- doing is causing us a problem inadvertently. It can be a little
- daunting to look at the actions and filters files themselves, since
- they tend to be filled with regular
- expressions whose consequences are not always so obvious.
+ we need to be able to see just what Privoxy is doing. Especially, if something
+ Privoxy is doing is causing us a
+ problem inadvertently. It can be a little daunting to look at the
+ actions and filters files themselves, since they tend to be filled with
+ regular expressions whose
+ consequences are not always so obvious.
One quick test to see if Privoxy is
causing a problem or not, is to disable it temporarily. This should be
- the first troubleshooting step. See the Bookmarklets section on a quick
- and easy way to do this (be sure to flush caches afterward!). Looking
- at the logs is a good idea too. (Note that both the toggle feature and
- logging are enabled via config file settings,
- and may need to be turned "on".)
+ the first troubleshooting step (be sure to flush caches afterward!).
+ Looking at the logs is a good idea too. (Note that both the toggle
+ feature and logging are enabled via config
+ file settings, and may need to be turned "on".)
Another easy troubleshooting step to try is if you have done any
customization of your installation, revert back to the installed
@@ -652,7 +577,7 @@ body {
"_top">google.com, and look at it one section at a time in a sample
configuration (your real configuration may vary):
-
+
@@ -718,8 +643,8 @@ In file: user.action [ View ] "+session-cookies-only" (i.e. not persistent). So we
will allow persistent cookies for google, at least that is how it is in
- this example. The second turns off any off any "+fast-redirects" action, allowing this to take
place unmolested. Note that there is a leading dot here -- [ View ] "actions" to "google.com":
-
+
@@ -822,7 +747,7 @@ In file: user.action [ View ] Now another example, "ad.doubleclick.net":
-
+
@@ -856,7 +781,7 @@ In file: user.action [ View ] "ad.doubleclick.net" is done here -- as both a "+block{}"
- and an and an "+handle-as-image". The custom alias "+block-as-image" just
@@ -866,7 +791,7 @@ In file: user.action [ View ] "http://www.example.net/adsl/HOWTO/". This one is giving
us problems. We are getting a blank page. Hmmm ...
-
+
@@ -947,13 +872,13 @@ In file: user.action [ View ] user.action file) that explicitly un blocks ( un blocks ( "{-block}")
paths with "adsl" in them (remember, last
match in the configuration wins). There are various ways to handle such
exceptions. Example:
-
+
@@ -972,7 +897,7 @@ In file: user.action [ View ] But now what about a situation where we get no explicit matches like
we did with:
-
+
@@ -995,7 +920,7 @@ In file: user.action [ View ] "+filter":
-
+
@@ -1016,7 +941,7 @@ In file: user.action [ View ] ". Or you could do your own exception to negate
filtering:
-
+
@@ -1040,14 +965,14 @@ In file: user.action [ View ] "+filter{banners-by-size}" rule, which assumes that
images of certain sizes are ad banners (works well most of the time since these tend to be
- standardized).
+ "emphasis">most of the time since these
+ tend to be standardized).
"{ fragile }" is
an alias that disables most actions that are the most likely to cause
trouble. This can be used as a last resort for problem sites.
-
+
@@ -1060,12 +985,12 @@ In file: user.action [ View ]
|
- Remember to flush caches!
- Note that the mail.google reference lacks the
- TLD portion (e.g. ".com"). This will
- effectively match any TLD with google in it,
- such as mail.google.de., just as an
- example.
+ Remember to flush
+ caches! Note that the mail.google
+ reference lacks the TLD portion (e.g. ".com"). This will effectively match any TLD with
+ google in it, such as mail.google.de., just as an example.
If this still does not work, you will have to go through the
remaining actions one by one to find which one(s) is causing the
@@ -1074,7 +999,7 @@ In file: user.action [ View ]
| | | | | | | | | | |