I\'ve been working on getting a regular expression to grab the TV Show or Movie name, the year it was aired if it exist, the season #and the episode # from the file name of a vi
if i may, i adapted brian's regex to match something like
SHOW.NAME.201X.SXXEXX.XSUB.VOSTFR.720p.HDTV.x264-ADDiCTiON.mkv
here it is (PHP PCRE)
/^(
(?P.*[^ (_.]) # Show name
[ (_.]+
( # Year with possible Season and Episode
(?P\d{4})
([ (_.]+S(?P\d{1,2})E(?P\d{1,2}))?
| # Season and Episode only
(?\d{1,2})E(?P\d{1,2})
)
|
# Show name with no other information
(?P.+)
)/mx