RSS Downloader tips requested. Suspect I'll need to use regex.

Other platforms, generic questions.
Post Reply
bastardsheep

RSS Downloader tips requested. Suspect I'll need to use regex.

Post by bastardsheep »

I've noticed that by default the RSS Downloaded picks up on the words anywhere in the filename.

So if I have"See*720p*", it'll match that regardless of whether "see" is how the filename starts or whether "see" is towards the back of the filename.

Is there a way to get it so it only matches from the start of the filename, or would I have to do regex for that? And if so, can anyone help me out with a regex that would capture only the upcoming tv show "see" and only in 720p?
User avatar
Peter
Administrator
Administrator
Posts: 2693
Joined: Wed Jul 07, 2010 6:14 pm

Re: RSS Downloader tips requested. Suspect I'll need to use regex.

Post by Peter »

Well, regex by itself, will only start from the beginning unless specified.
For example:

See.*720p.*

.* means . can be any character, * can be any number. so it can be anything between See+720p and after 720p.
But it must begin with See.

My tips for regex:
- Copy out a few filenames to notepad or something
- Google for "regex tester online", check which site tickles your fancy
- paste in your filenames to see if they'll behave, and also insert some other examples that SHOULD NOT trigger
- see if the regex I posted above, or the one you come up with, works

regex looks scary, but the very basic ones like the one you seek are super simple.
bastardsheep

Re: RSS Downloader tips requested. Suspect I'll need to use regex.

Post by bastardsheep »

Excellent, thanks for that. Glad it can be done via regex in such an easy to understand way. I've modified the simpler of my entries, the ones that were single word shows and most likely to trigger false positives. I'll see how it goes.
bastardsheep

Re: RSS Downloader tips requested. Suspect I'll need to use regex.

Post by bastardsheep »

Turns out it's not as simple as switching over to Regex.

Overnight my regex filter for "evil.*720p.*" picked up two episodes of "the.devil.next.door.sXXeXX.blah.720p.blah". So even regex doesn't start from the front per se. I'm going to have to add "next.*door.*" in to my "and doesn't contain" filters for that show.
User avatar
Peter
Administrator
Administrator
Posts: 2693
Joined: Wed Jul 07, 2010 6:14 pm

Re: RSS Downloader tips requested. Suspect I'll need to use regex.

Post by Peter »

haha, yea that's why you should test on "regexr" on some other online regex site with good, near good, and bad samples.
regex supports "starts with" too.

see: https://javascript.info/regexp-anchors

good luck!
klepptoman

Re: RSS Downloader tips requested. Suspect I'll need to use regex.

Post by klepptoman »

bastardsheep wrote: Tue Nov 05, 2019 10:12 pm Turns out it's not as simple as switching over to Regex.

Overnight my regex filter for "evil.*720p.*" picked up two episodes of "the.devil.next.door.sXXeXX.blah.720p.blah". So even regex doesn't start from the front per se. I'm going to have to add "next.*door.*" in to my "and doesn't contain" filters for that show.
I have exactly the same issue for the same name. Did you fix it and if so what syntax did you use please?
SideshowBob

Re: RSS Downloader tips requested. Suspect I'll need to use regex.

Post by SideshowBob »

regular expresions aren't anchored by default so you would need:

"^evil.*720p" if you want it to start at the beginning

"\bevil.*720p" if you simply don't want it to start in the middle of a word
klepptoman

Re: RSS Downloader tips requested. Suspect I'll need to use regex.

Post by klepptoman »

SideshowBob wrote: Fri Apr 24, 2020 11:25 am regular expresions aren't anchored by default so you would need:

"^evil.*720p" if you want it to start at the beginning

"\bevil.*720p" if you simply don't want it to start in the middle of a word
Thanks Bob
Post Reply