Regular Expressions 101

Community Patterns

Tv Series name extractor

1

Regular Expression
Python

r"
^(.+?)[-. ]{0,3}s?(\d?\d)[ex](\d\d)[-. ]{0,3}(.*?)[-. ]?(?:(?=pulcione|eng|ita|\w+Mux|\w+dl|\d+p|XviD|NovaRip).+)?\.([\w]{2,3})$
"
img

Description

Extract from a tv series file the name of the series, the season, episode and the title.

Submitted by dshinigami - 9 years ago