This forum has been archived. All content is frozen. Please use KDE Discuss instead.

regexps, excludes

Tags: None
(comma "," separated)
bathat
Registered Member
Posts
2
Karma
0

regexps, excludes

Mon Apr 09, 2007 3:25 am
Hi,
I have a question regarding regular expressions and reject filters.

I want to tell KTorrent to download all HDTV releases and not HR, AC3, 720p, mkv. However, the rss feed I'm using only includes information when the torrent is high-res and not when it's H/PDTV.

So, I figured out that I want to do something like this with regexp...
Doctor.Who.*.#~/(HR|AC3|720p|mkv)/.*

But it seems the syntax doesn't carry over from a programming language to KTorrent.

I've also been trying to figure out how to have it match only "Doctor Who" and not "Doctor Who Confidential", for example, but the double quotes don't work either.

Lastly, could someone shed some light on the reject filter feature. How do I use this?


The forum is helpful, but some better documentation would be a big help for users.
Thanks
bathat
Registered Member
Posts
2
Karma
0

Tue Apr 10, 2007 12:57 am
Just in case anyone else has a question along similar lines, I will post the solution:

It's very simple:
^Doctor.*[^)]$

The beginning carrot symbol signifies the beginning of the string. The [^)] says not to match any torrent with a parenthesis at the end of the line and the '$' represents the end of the line.

If you're slightly anal-retentive such as myself and since KTorrent doesn't have a way to sort filters, you can even create one long regexp for all your favorite shows...

^(show|show|show).*[^)]$


Hope this helps.
jetpeach
Registered Member
Posts
28
Karma
0

thanks

Wed Apr 18, 2007 4:01 am
thanks for the info. i'm not that familiar with regexp, is this what they call the python type of regexp format then? It would be great if there was documentation on it, perhaps i should write some if I figure it out :)


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], q.ignora, watchstar