Re: Privoxy redirect rule for Wikipedia! :)

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

 



On Sun, 20 Mar 2011 08:56:06 -0700
johhny_at_poland77 <johhny_at_poland77@xxxxxxxx> wrote:

> { +redirect{s@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@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.
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux