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

How to make a correct regexp for RSS Filter?

Tags: None
(comma "," separated)
WiseLord
Registered Member
Posts
6
Karma
0
I use KTorrent's RSS to download new episodes of favourite series. But I have a problem with writing good regexp.
For example, RSS includes usual and hd versions of episodes:
Code: Select all
...
За Гранью (Fringe). Плато (The PIlateau 720p).. (S03E03)
За Гранью (Fringe). Плато (The PIlateau).. (S03E03)
...

If I want HD, I can use something like Fringe.*720p as a filter.
But how to write regular expression for filter to download non-hd version? Something like Fringe.*[^(720p)] doesn't work. Maybe it's a bug?
George
Moderator
Posts
5421
Karma
1
Negative lookahead:

Foo(?!.*Bar)

Means Foo followed by anything but Bar
WiseLord
Registered Member
Posts
6
Karma
0
Thank you, it works.
badregexp
Registered Member
Posts
2
Karma
0
Thanks, but how to match "foo" (anywhere) but neither "bar" nor "club"?

I've tried *foo*(?!.*bar*|*club*) and
*foo*(?!.*bar*)|(?!.*club*)
and also read through
http://www.regular-expressions.info/quickstart.html

without any joy.

Thanks
badregexp
Registered Member
Posts
2
Karma
0
I think that
.*foo(?!.*bar|.*club) seems to work


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot]