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

Need help making a filter from an rss feed

Tags: None
(comma "," separated)
flinkdeldinky
Registered Member
Posts
4
Karma
0
I'm using Ktorrent's (3.3rc1) rss Syndication. I've no problem adding the feed. But I don't know how to make the filter do what I want.

This is for an eztv feed. Some shows are hdtv and some are x264. I've got no problem making a filter to grab a specific show and even just the x264 version. The problem is filtering out the x264 version of the show.

Example:

I don't want this:
Heroes S04E07 720p HDTV X264-DIMENSION [eztv]

but I do want this:
Heroes S04E07 HDTV XviD-LOL [eztv]

It's easy enough to make a filter grab only x264 versions of the show, but I want to specifically filter out x264.

So basically in the example above there are only three things I care about:
heroes hdtv x264

Ideally it would be easy, something like:
+heroes +hdtv -x264

I've done a lot of googleing regular expressions and I've still got no idea how to do it.
George
Moderator
Posts
5421
Karma
1
This should do the trick :

Heroes.*HDTV(?!.*X264)
flinkdeldinky
Registered Member
Posts
4
Karma
0
Thank you George. Your regular expression did the trick.

Wondering if you can give me a good reference or link where I could learn about regular expressions? Or maybe explain the key part: (?!.*X264)
George
Moderator
Posts
5421
Karma
1
foo(?!bar)

Is negative lookahead, foo followed by everything but bar is accepted.
flinkdeldinky
Registered Member
Posts
4
Karma
0
Ok, thanks. Maybe a bug should be filed? When doing filters a little blurb on regular expressions appears. It maybe a good idea to ad the (?!text) to it to help people out.
George
Moderator
Posts
5421
Karma
1
I have been meaning to add it to the wiki page about the syndication plugin, but haven't gotten around to it.
flinkdeldinky
Registered Member
Posts
4
Karma
0
I just did a search for "filter" on the forum and this thread came up on the top so I don't think the lack of a wiki entry is a problem. I did a forum search before posting so I think others will as well.


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft