Hi, I’ve some difficult to create a regular expression to exclude unwanted downlod
sometimes, bad releaser, put strange names, for example
Lucifer S03e15 [XviD - Eng Mp3 - Sub Ita Eng] DLRip By Pir8 [CURA] Fede e Religioni
Lucifer S03e01-08 [XviD - Eng Mp3 - Sub Ita Eng] DLRip By Pir8 [CURA] Fede e Religioni SEASON PREMIERE
Young Sheldon S01e13 [SATRip 720p - H264 - Eng Ac3 - Sub Ita] HDTV by AVS
I want to download Italian release, sonarr in this case download the rel, but is wrong! This’s a eng rel with sub ita.
I can’t simply exclude sub ita because happen most of times that also inside italian release, sub are present so … a regex is needed, but I’ve so difficult to make a string where I’ve to reject rel with
Eng [some extra char, for example AC3 or mp3 or some - or . or others] sub ita
For now this’s what I got \b(eng\w{0,10}sub ita|hevc)\b/i
Please don’t consider for now hevc is only a memo for me to insert variations about various possibilities.
Ok, I’m here: /\beng\W+(?:\w+\W+)sub\s?ita\b/i
But I’ve a problem with this Young Sheldon S01e08 [Mux 1080p - H264 - Ita Eng Ac3 - Sub Ita Eng] WEBMux Morpheus
Because match the eng … sub ita, but this is Ita eng … sub ita and is fine!
How to tell that ita eng … sub ita is right and eng … sub ita don’t?
With some stackoverflow help, maybe I found one regex that do what I need, the only problem now is that if I put into Sonarr, on a manual search Sonarr tell me unrecognized escape sequence \K
On all possible rel, even the good one
The code with all example can be found here
or you can see it here: /^(?:(?!\b(eng|ita)\b).)*\K\beng\W+\w+\W+sub\s?ita\b/i
So the possible solution don’t works inside Sonarr but works outside.
No, \K doesn’t work. What you replace it with will depend what you’re trying to do exactly.
Based on what you said in your original post I think I understand somewhat what you want, but without an example showing exactly what you do want and don’t want I’m not sure.
Not sure why you need a look around at all, given what you want to exclude something like: \beng.+?sub[-._ ]ita
Should work (assuming I’m understanding your original post correctly).
Ok, the problem happen when Sonarr don’t recognize correctly some release, for example:
Lucifer S03e01-08 [XviD - **Eng Mp3 - Sub Ita Eng**] DLRip By Pir8 [CURA] Fede e Religioni SEASON PREMIERE
Young Sheldon S01e13 [SATRip 720p - H264 - **Eng Ac3 - Sub Ita**] HDTV by AVS
Morpheus The.Breadwinner.2017.**ENG.Sub.ITA**.HDRip.XviD-[WEB]
All those are in english, for the last one I think there’s no problem, but the first 2 are recognized as english by far from Sonarr.
Ok I try to explain myself in a better way that I can
Sometimes sonarr don’t recognize correctly a release, for example I search a tv show with Italian profile, and I do a search so sonarr grab this Lucifer S03e15 [XviD - Eng Mp3 - Sub Ita Eng] DLRip By Pir8 [CURA] Fede e Religioni
But this is an english release, not italian.
So I’ve to use a regex to make it works.
By the way, is possible to make insert a profile name in Restrictions? Actually there’s a tag, but if I specify a tag, for each tv show that I follow I’ve to add the same tag, even on new series I’ve to edit and insert a tag. But if you add into Restrictions, a field where I can select a profile name, I can also, for example, tell to apply one restriction only when I use one ore more profile name. Clear enough?
This for now works.
I use 2 profile, one italian and one english, so I hope this regex don’t preclude any english release, for that I asked you if is possible add a filter inside restriction that match to profile name