lad1337 / Sick-Beard

PVR & episode guide that downloads and manages all your TV shows
http://code.google.com/p/sickbeard/
GNU General Public License v3.0
70 stars 26 forks source link

Show names with numbers in them are not parsed correctly #12

Closed JonCubed closed 8 years ago

JonCubed commented 11 years ago

I have a few shows like Submarine 707R and goglo 13 which can't get parsed correctly the number is picked up as the absolute value.

Here is a modified version of the standard regex that removes the ? in the series name group to allow it to be greedy and parse correctly. Also made extra info optional.

^([(?P.+?)][ ._-]*)? (?P.+)[ ._-]+ (?P\d{1,3}) (-(?P\d{1,3})) ?(v(?P[0-9]))?[ ._-]+ ([(?P\d{3,4}[xp]?\d{0,4}[.\w\s-])])? ([(?P\w{8})])? .?