View Single Post
Old 02-08-2021, 09:42 PM   #3
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by Widukind View Post
In Calibre I have a custom column 'comment'.
When I import a book like 'Lewis Carroll - Alice 01 - Wonderland # illustrated' the text after # should go to this column.

Until a year ago I used for this purpose the regex:
(?P<author>(??!\s-\s).)*)\s*-?\s*[0-9]*\s*(?P<series>(??![0-9]?[0-9-]\.?[0-9]*\s-\s).)*)?\s?(?P<series_index>[0-9]+.?[0-9]*)?\s?-?[0-9]*\s*-\s(?P<title>[^#]+)\s?(?P<comment>[#\s].*)?

But this doesn't work anymore: the text 'illustrated' is not added to the comment column but to the comments section in the Metadata screen.

How can I resolve this?
As Kovid said, you cannot update custom columns. In your regex, the "?P<comment>" is the name of the built in comments column (). If this was going to work, you would probably need to use "#comment" to refer to your column.

You should be able to achieve what you want with the GetFileName plugin. It will add the file name to a separate custom column. You can then parse that to your custom columns.
davidfor is offline   Reply With Quote