Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 02-09-2013, 02:12 AM   #1
theichens
Junior Member
theichens began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Feb 2013
Device: Odys Touch
Need help with RegExp

Hello,

i have the following problem:
My filename looks like that: Wilhelm, Jan--Das Haus_Steinstrasse.epub
Now when i import this file into calibre, i use the regexpression:
(?P<author>.+?)--(?P<title>.+)
The following occurs:
Author: Wilhelm, Jan
Title: Das Haus Steinstrasse <-- the underscore is lost

How do i have to change the regexpr to get the title as given in the
filename "Das Haus_Steinstrasse" ?

Thank you very much for your help.
theichens is offline   Reply With Quote
Old 02-09-2013, 08:40 AM   #2
Adoby
Handy Elephant
Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.
 
Adoby's Avatar
 
Posts: 1,022
Karma: 3679628
Join Date: Dec 2009
Location: Southern Sweden, far out in the quiet woods
Device: Ubuntu Linux, Cybook Opus, Motorola Xoom with Mantano Premium
I don't think that is possible. Calibre intentionally change underscores to spaces. There was even a special enhancement applied for that once...

http://oldbugs.calibre-ebook.com/ticket/4272

Typically special characters like +- and so on are not allowed in the filenames. They are replaced with an underscore. So you will have to edit the filename manually.

Also, I am pretty sure that the actual title of the book doesn't include an underscore? Searches for metadata to dowhnload would be more likely to fail with the underscore present.

Another alternative may be to try to add the book and read the metadata from inside the book instead. That way you may even get the correct character that was replaced by the underscore.
Adoby is offline   Reply With Quote
 
Enthusiast
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with Regexp for importing Magazines donnelyn Library Management 5 08-24-2011 10:56 AM
Regexp help - I think... paulfiera Calibre 4 07-20-2011 03:27 AM
RegExp in search field Format C: Library Management 4 06-13-2011 11:00 AM
Is this as it supposed to be? (Regexp issue?) Mixx Calibre 13 03-09-2011 03:30 AM
Error in Regexp documentation arifzaman Calibre 3 03-02-2011 06:03 AM


All times are GMT -4. The time now is 06:52 PM.


MobileRead.com is a privately owned, operated and funded community.