View Single Post
Old 02-21-2009, 03:21 PM   #67
ilovejedd
hopeless n00b
ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.
 
ilovejedd's Avatar
 
Posts: 5,111
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
Quote:
Originally Posted by kovidgoyal View Post
Surround the series + number + - part in parentheses and follow it by {0,1}
Thanks for the quick response.

The modified expression works ok with files named Author - Title

For:
Author - Series ## - Title

it gave me the following:
Title: Title
Author: Author - Series ##
Series: No match
Series Index: No match
ISBN: No match

I also tried (?P<author>[^_]+) - ((?P<series>.*) (?P<series_index>[0-9]*) - )?(?P<title>.+) but it gave me the same result as above.

Question, what does [^_] signify? Is it necessary for Calibre to make the author match or can I change it to something else? I've tried grouping the ' - ' with other parts of the expression and the series info always ends up as part of the author name unless both instances of ' - ' are present. Methinks the regex for author might be a bit too greedy?
ilovejedd is offline