Quote:
Originally Posted by waalw
I am trying to make an regexp to get the following items from a filename
series seriesindex - title - author. I made this regexp, but the seriesname and index do not apear. What is missing?
(?P<series>[^_0-9-]*)(?P<series_index>[^_0-9-]*)\s* - (?P<title>[^_]*)\s* - \s*(?P<author>[^_].+) ?
Sample filename = De Donkere Tijd 1 - Schaduwen boven Ullart - Markus Heitz.epub
|
This one seems to work, using \s*-\s* as they do in the example one

(\s* stands for 0 or more of any type of space)
(?P<series>[^_0-9-]*)(?P<series_index>[0-9]*)\s*-\s*(?P<title>[^_].+)\s*-\s*(?P<author>[^_-]+)