View Single Post
Old 2008-05-29, 05:05   #12 (permalink)
campnic
Portal Member
 
Join Date: Apr 2008
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts


Default

Type: Parsing - Regex
Amazon Unbox Support
Description:
I just modified a stock regex to account for Amazon using three digits instead of 2 for the episode number. Bad with regular expressions so I don't know how well it will hold up
Series - S##E### - Title.Ext

Code:
^.*?\\?(?<series>[^\\$]+?)(?:s(?<season>[0-1]?\d)e(?<episode>\d\d\d)|(?<season>(?:[0-1]\d|(?<!\d)\d))x?(?<episode>\d\d))(?!\d)(?:[ .-]?(?:s\k<season>e?(?<episode2>\d{2}(?!\d))|\k<season>x?(?<episode2>\d{2}(?!\d))|(?<episode2>\d\d(?!\d))|E(?<episode2>\d\d))|)[ -.]*(?<title>(?![^\\]*?sample)[^\\]*?(?<HR>HR\.)?[^\\]*?)\.(?<ext>[^.]*)$

Last edited by campnic; 2008-05-29 at 21:02.
campnic is offline   Reply With Quote