in

andy vt's tools & blog

automating lazy

Better TV Espisode Matching RegEx - If you want it

Last post 06-19-2012 11:42 AM by JohnGalt. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 03-20-2012 2:23 PM

    Better TV Espisode Matching RegEx - If you want it

    (?.+?)[\.-\s]+[sS\s]*(?\d+)[eExX](?\d+).* this will match (properly): Crusade.s01x13.mkv Crusade.s01e13.mkv Crusade - s01x13.mkv Crusade - s01e13.mkv Crusade.s01e13.mkv Crusade.s01e13.mkv Crusade 1x12.mkv Crusade.1x13.mkv etc. etc. Properly. It doesn't care what's after what it finds for the 3 sections that matter. Let me know if it would be useful and I can expand it to try and find the Episode Name. MIght be useful if the metadata lookup failed, then it could fill everything in. My objective is to make every case work properly when converting these to wtv files....
  • 03-21-2012 4:18 AM In reply to

    Re: Better TV Espisode Matching RegEx - If you want it

    Here's a refined version that works with the odd version of RegEx that DVRMSToolbox uses:

    (?.+?)[ \.-]+[ sS]*(?\d+)[eExX](?\d+).*
  • 04-02-2012 1:58 PM In reply to

    • miles267
    • Top 50 Contributor
    • Joined on 10-28-2010
    • NW Arkansas

    Re: Better TV Espisode Matching RegEx - If you want it

    By default, DVRMSToolbox uses this exact text string:

    (?<series>.+)\.[s,S](?<season>\d+)[e,E](?<episodenbr>\d+)\.

    Are you saying that this should be replaced with what you typed below?

    JohnGalt:
    Here's a refined version that works with the odd version of RegEx that DVRMSToolbox uses:

    (?.+?)[ \.-]+[ sS]*(?\d+)[eExX](?\d+).*
     

  • 04-02-2012 7:47 PM In reply to

    Re: Better TV Espisode Matching RegEx - If you want it

    Yes exactly as I put it.

    Matches far more permutations of file names than the default without falsepositives.

  • 06-19-2012 11:42 AM In reply to

    Re: Better TV Espisode Matching RegEx - If you want it

    Here's the version escaped so that it doesn't get eaten by the forum engine. (?<series>.+?)[ \.-]+[ sS]*(?<season>\d+)[eExX](?<episodenbr>\d+).*
Page 1 of 1 (5 items)
@2008 andy vt
Powered by Community Server (Non-Commercial Edition), by Telligent Systems