Expressions/Rules exchange (1 Viewer)

djburt

New Member
April 10, 2008
3
0
Home Country
United States of America United States of America
Type: Parsing - Simple
Podcasts
Description:
How to parse a podcast with the numbering scheme 0001-9999. Marks all Seasons of the podcast as Season 1.
Must use String Replacement to insert Season 1 Identifier (Season number identified after -- and before x).
Code:
Example String Replacement

Sample Filenames:
diggnation--0142--2008-03-20hamsters--hd.h264.mov
diggnation--0143--2008-03-27foxnews--hd.h264.mov
diggnation--0144--amsterdamnation2--hd.h264.mov

Replace This: diggnation--
With This: diggnation--1x
Code:
Simple Expression to parse

<series>--<season>x<episode>--<title>.<ext>
 

campnic

Portal Member
April 3, 2008
8
0
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>[^.]*)$
 

tzuriel

Portal Member
March 4, 2008
8
0
Type: Parsing - Regex
Description: This Regex will properly parse shows that have 3 digit episode numbers like Late Show with David Letterman
so letterman.13104.ep2517.avi will parse out as Season 13 Episode 104


Expression:

Code:
^.*?\\?(?<series>[^\\$]+?)(?:s(?<season>[0-3]?\d)\s?ep?(?<episode>\d\d\d)|(?<season>(?:[0-3]\d|(?<!\d)\d\d))x?(?<episode>\d\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)[^\\]*?[^\\]*?)\.(?<ext>[^.]*)$
 

Erazor2

Portal Member
September 6, 2007
11
0
Home Country
Germany Germany
Type: Parsing - Regex
Description: This Regex should match any pathnames like those:
  • The 4400\01\The 4400 - 01x01 02 - Title - eng.avi
  • The 4400\01\The 4400 - 01x03 - Title - eng.avi

Code:
^[^\\$]+\\[^\\$]+\\((?<series>[^\\$$]+)( - ))((?<season>[\d]+)x(?<episode>[\d]+)([\s]+(?<episode2>[\d]+))?( - ))((?<title>[^\\$]*)( - ))(?<language>[^\\$]*)\.(?<ext>[^\\$]+)$
 

PUT

Portal Member
February 24, 2008
11
2
Home Country
Sweden Sweden
Type: Parsing - Regex
Description: For rar files, excluding part02.rar etc
My.Show\My.Show.S01E12-NoOne\My.Show.S01E12-NoOne.rar
My.Show\My.Show.S01E12-NoOne\My.Show.1x13.Foo.Name-NoOne.rar


Code:
\\(?<series>.+)\.s(?<season>[0-9]+)e(?<episode>[0-9]+).+?\\.+(?:(?<!part\d\d\d|part\d\d)\.rar|\.part0*1\.rar)

\\(?<series>.+)\.(?<season>[0-9]+)x(?<episode>[0-9]+).+?\\.+(?:(?<!part\d\d\d|part\d\d)\.rar|\.part0*1\.rar)
 

UNOPARATOR

MP Donator
  • Premium Supporter
  • September 19, 2007
    231
    70
    Istanbul
    Home Country
    Turkey Turkey
    Type: Parsing RegEx
    Description: This RegEx gets the series name from the first folder (so series like 90210 works),
    handles up to 4 digit season numbers & up to 3 digit episode numbers for S##E## filename formating

    Single episode example:
    Show Name\Show Name - Season #\Show.Name.S##E##.Episode.Name.SOURCE.CODEC-RELEASEGROUP.extension
    Double episode example:
    Show Name\Show Name - Season #\Show.Name.S##E##-##.Episode.Name.SOURCE.CODEC-RELEASEGROUP.extension

    Make this RegEx single line before using:
    Code:
    (?:(?<series>^.*?)\\)
    (?:\k<series>(?: [\[|\(](?<year>\d{4})[\]|\)]|) - Season \d{1,4}\\)
    (?:.*\.S(?<season>\d{1,4})E(?(\d{1,3}\-\d{1,3})(?<episode>\d{1,3})\-(?<episode2>\d{1,3})|(?<episode>\d{1,3})))(?(\.)\.
    (?<title>.*)(?:\-(?<releaseGroup>.*)\.|\.)(?:(?<ext>[^.]*)))$
    Note 1: for getting rid of SOURCE & CODEC etc. just add the necessary keywords to String Replacements...
    Note 2: episode2, title, ReleaseGroup fields are optional, if they are not matched they don't break the rest of fields from parsing...

    Updated [2009-11-09]:
    - Added support for "-" character in the title to correctly parse ReleaseGroup when the title includes "-" characters.
    - Also added support for Series Name [####] or Series Name (####) folders under the main series folder...
     

    bjarkimg

    Portal Member
    May 12, 2008
    16
    1
    Home Country
    Iceland Iceland
    Hi just spent few hours parzing this :)

    Type: Parsing - simple/Regex
    yyyy parsing
    Description:
    be able to parse this
    Horizon.s2010e01.titlename....
    Expression:
    Code:
    (?<series>[^\\$]*)s(?<season>\d{4})e(?<episode>\d{1,2})

    Keep up the grate work.
     

    Hillbillie

    Portal Member
    June 19, 2009
    30
    4
    Arkansas
    Home Country
    United States of America United States of America
    Type: Parsing - Regex

    Description:

    Here is the path for my TV Episodes where the '01' is episode #:

    D:\Movies\TV Series\J.A.G\Season 10\01 A New Life.avi
    D:\Movies\TV Series\Man vs. Wild\Season 5\01 Baja Desert.avi
    D:\Movies\TV Series\Sea Patrol\Season 3\01 Catch and Release.avi

    Use the code below to import. Thanks RoChess for the solution.

    Code:
    Code:
    \\(?<series>[^\\$]+)\\Season\s(?<season>\d+)\\(?<episode>\d+)\s(?<title>.*)\.(?<ext>.*)
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    I tried this expression but no luck . I'm having difficulty getting these to parse:
    D:\TVSeries\Babylon 5\Season 1\07 - The War Prayer.avi

    Your filename has the ' - ' between episode number and title, which throws the expression off, so use:

    Code:
    \\(?<series>[^\\$]+)\\Season\s(?<season>\d+)\\(?<episode>\d+)\s-\s(?<title>.*)\.(?<ext>.*)

    Also be sure to adjust the priority to top position if all your shows are like this, otherwise you might encounter a false positive on the existing expressions.
     

    RivaSA

    Portal Member
    June 24, 2009
    35
    3
    Home Country
    South Africa South Africa
    :DThanks to everyone that has helped.:D

    These three work like a treat.

    Redexp

    Used For Name\Name s####e## (F1\F1 s2008e01)
    (?<series>[\w]+)\s*(?<season>\d{4})e(?<episode>\d{1,2})

    Used For Name\Name s##e## (v 2009\v 2009 s01e01)
    ^.*?\\?(?<series>[^\\$]+?)(?:s(?<season>[0-3]?\d)\s?ep?(?<episode>\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)[^\\]*?[^\\]*?)\.(?<ext>[^.]*)$

    Used For Name\Name s##e## (v 2009\v 2009 s01e01)
    ^.*?\\?(?<series>[^\\$]+?)[ .-]+[\#s]?(?<season>\d+)[ .-]?[ex.](?<episode>\d+)[+-]?(?<episode2>\d+)?[ .-]*(?<title>(?![^\\]*?sample)[^$]*?)\.(?<ext>[^.]*)$

    Used For Name\Name s##e#### (Top Gear\Top Gear s00e0222)
    ^.*?\\?(?<series>[^\\$]+?)[ .-]+[\#s]?(?<season>\d+)[ .-]?[ex.](?<episode>\d+)[+-]?(?<episode2>\d+)?[ .-]*(?<title>(?![^\\]*?sample)[^$]*?)\.(?<ext>[^.]*)$

    Hope this helps those who need, they are the only three I use.;)
     

    Users who are viewing this thread

    Top Bottom