diff --git a/guessit/rules/common/__init__.py b/guessit/rules/common/__init__.py index f9ce98a..e9da2aa 100644 --- a/guessit/rules/common/__init__.py +++ b/guessit/rules/common/__init__.py @@ -3,9 +3,12 @@ """ Common module """ -seps = r' [](){}+*|=ยง-_~#/\.,;:' # list of tags/words separators +import re + +seps = r' [](){}+*|=-_~#/\\.,;:' # list of tags/words separators +seps_no_fs = seps.replace('/', '').replace('\\', '') title_seps = r'-+/\|' # separators for title -dash = (r'-', r'[\W_]') # abbreviation used by many rebulk objects. -alt_dash = (r'@', r'[\W_]') # abbreviation used by many rebulk objects. +dash = (r'-', r'['+re.escape(seps_no_fs)+']') # abbreviation used by many rebulk objects. +alt_dash = (r'@', r'['+re.escape(seps_no_fs)+']') # abbreviation used by many rebulk objects. diff --git a/guessit/test/rules/episodes.yml b/guessit/test/rules/episodes.yml index 61eea57..387e08e 100644 --- a/guessit/test/rules/episodes.yml +++ b/guessit/test/rules/episodes.yml @@ -117,3 +117,9 @@ ? A very special episode : options: -t episode episode_details: Special + +? 12 Monkeys\Season 01\Episode 05\12 Monkeys - S01E05 - The Night Room.mkv +: container: mkv + title: 12 Monkeys + episode: 5 + season: 1 \ No newline at end of file