Current version:
Fixes:
thank you is perfect!
I-m not very good in RegEx may I ask your help?
I need to do the same but on multipart movies, like CD1, CD2 and I would like to have an outcome like the one for series:
Your amazing ReGeX n this case:
foo s01e01 - title 1.ext
will report
Series: foo
Season: 01
Episode: 01
Episode2:
Title: title 1
Ext: ext
So can you help me build the RegEx for this case:
Code:
[i]foo CD01.ext[/i]
will report
Movie: foo
Part: 01
Part2:
Title:
Ext: ext
[i]foo CD01 CD02.ext[/i]
will report
Movie: foo
Part: 01
Part2:02
Title:
Ext: ext
[i]foo CD0102.ext[/i]
will report
Movie: foo
Part: 01
Part2:02
Title:
Ext: ext
[i]foo part01.ext[/i]
will report
Movie: foo
Part: 01
Part2:
Title:
Ext: ext
Some samples could be:
Code:
foo CD1.iso
foo CD1CD2.iso
foo CD1 CD2.iso
foo CD1 CD2 CD3.iso
foo - 1.iso
foo - 01.iso
foo - 02.iso
foo (2001) CD1.iso
foo (2001) CD1CD2.iso
foo (2001) CD1 CD2.iso
foo (2001) CD1 CD2 CD3.iso
foo (2001) part1.iso
foo (2001) - 1.iso
foo (2001) - 01.iso
foo (2001) - 02.iso
foo part1.iso
foo part1part2.iso
foo part1 part2.iso
foo part1 part2 part3.iso
foo (2001) part1.iso
foo (2001) part1part2.iso
foo (2001) part1 part2.iso
foo (2001) part1 part2 part3.iso
I was able to do (starting from yours):
Code:
^(?:.*\\)?(?<movie>[^\\]+?)[ _.\-\[]+(?:(?:cd[ _.\-\[\]]*)?(?<part>\d+)|(?:part[ _.\-\[\]]*)?(?<part>\d+)|(?:\#|\-\s)(?<part>\d+))(?:[ _.+-]+(?:(?:cd)?\k<part>[ _.\-\[\]]*(?<part2>\d+)|(?:part)?\k<part>[ _.\-\[\]]*(?<part2>\d+)|(?:\#|\-\s)\k<part>(?<part2>\d+))|(?:[ _.+-]*cd(?<part2>\d+))|(?:[ _.+-]*part(?<part2>\d+)))*[ _.\-\[\]]*(?<title>(?![^\\].*?(?<!the)[ .(-]sample[ .)-]).*?)\.(?<ext>[^.]*)$
but I get false positives on
•foo.1x01.1x02.*
(gets the 1.)
foo s01e01 - title 1.ext
gets movie:foo s01e01 - title
part:1
and similar
How can I exclude any form 1.<number> 1x<number> and filter correctly?