View Single Post
Old 08-24-2011, 09:32 AM   #1
donnelyn
Junior Member
donnelyn began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Aug 2011
Device: Kindle
Help with Regexp for importing Magazines

Hi,

I am trying to import magazines into calibre and I want to have the Year imported into Series and Month (in numerical form) into Series Index.

The filenames are in the form of
Analog Science Fiction and Fact, 2008-03, March 2008.mobi
Analog Science Fiction and Fact, 2008-01, January-February 2008.mobi

but I could rename them to the following form if that's easier

Analog Science Fiction and Fact - 2008-03 - March 2008.mobi

I was using the following regexp
(?P<title>.+) ?\s*(?P<series>[0-9][^_-]+) -?\s*(?P<series_index>[0-9]*)\s*-\s*

and test filename Analog Science Fiction and Fact - 2008-03 - March 2008.mobi

But it includes the year as part of the title and puts the number of the month into the series instead of the series index.

Can any kind soul offer me some help please
donnelyn is offline   Reply With Quote