Privoxy redirect rule for Wikipedia! :)

Suvayu Ali fatkasuvayu+linux at gmail.com
Mon Mar 21 00:29:23 UTC 2011


On Sun, 20 Mar 2011 08:56:06 -0700
johhny_at_poland77 <johhny_at_poland77 at zoho.com> wrote:

> { +redirect{s at http://de.wikipedia.org/wiki/@https://secure.wikimedia.org/wikipedia/de/wiki/@} }
> .de.wikipedia.org
> 
> 
> ..so you get the problem: is there any way to put a "regexp" or
> something to: "en", "de"? There are hundreds of other languages, i
> think it's a bad solution to write down them all.

I have never used privoxy so I don't know what kind of regexp is
supported but does the following work?

s at http://\([a-z]\{2\}\).wikipedia.org/wiki/@https://secure.wikimedia.org/wikipedia/\1/wiki/@

You might need to change some of the quoting. Above I have only quoted
the parentheses and braces.

How the above should work:
\([a-z]\{2\}\) - this matches any two consecutive letters between a-z
\1 - this is replaces with whatever was matched within the parentheses

Hope this helps.

-- 
Suvayu

Open source is the future. It sets us free.


More information about the users mailing list