This is the way I designed it, Part1 should always be CD1 (blank if no CD1), Part2 would be CD2 (again blank if no CD2) and Part3 (if you setup the 3rd one as part3) would be CD3, So:
If you want it so part1 is always the first CD number supplied and part2 is the 2nd CD supplied then just change 0*1 to 0*[123] and 0*2 to 0*[23]
Code:
foo - CD1.iso => Part1 = 1
foo - Part02 Part03 => Part2 = 02 Part3 = 03
foo - 3.mkv => Part3 = 3
If you want it so part1 is always the first CD number supplied and part2 is the 2nd CD supplied then just change 0*1 to 0*[123] and 0*2 to 0*[23]