View Single Post
Old 01-22-2019, 09:51 AM   #2
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,110
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
Note, default Calibre import setting when getting metadata from filename is actually:

title - author

Regular expression (Preferences > Import/export > Adding books > Regular expression)
Code:
(?P<title>.+) - (?P<author>[^_]+)


You can certainly modify the regular expression to fit your needs (caveat, doesn't work with folder names afaik).

I think one of the pre-made options in the regex dropdown already include series in the format:

author - series 1 - title

Regular expression
Code:
(?P<author>[^_-]+) -?\s*(?P<series>[^_0-9-]*)(?P<series_index>[0-9]*)\s*-\s*(?P<title>[^_].+) ?
ilovejedd is offline   Reply With Quote