![]() |
#1 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Nov 2020
Device: None
|
Regex not working for importing books
Basic Information;
Calibre Version: 5.5 Windows 10 Issue; I want to use the regex option in calibre when importing books. I made up a regex (Well with help from the internet!) and want to apply it when importing ebooks. But the regex option is just not working/ignoring the regex i apply. It is tested online on a regex tester/debugger and there it works perfect for what it needs to do! See here: https://regex101.com/r/dWo044/1 Let me explain some more... I got files called as example: #_MIST_#_... Cartoons - 02 - Dieven Cartoons.cbr #_MIST_#_1850 - 02 - Donald.cbr What i want the regex to do is copy the text between "#_MIST_#_" and between the first " - " That i do with this: (?<=^#_MIST_#_)(?P<series>[^-]+)(?=\s-) So: #_MIST_#_... Cartoons - 02 - Dieven Cartoons.cbr The title becomes: ... Cartoons And for: #_MIST_#_1850 - 02 - Donald.cbr The Title becomes: 1850 But when i click test (When i enter a file name in the regex tester in calibre included is the extension!) It just don't add the text part to the correct textbox (In series). Am i doing something wrong or? Thank you in advance ![]() |
![]() |
![]() |
![]() |
#2 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Nov 2020
Device: None
|
I uploaded image to show what i try to do:
![]() As seen on the image you see the regexp i added into the software The regexp i gotten from "The Fourth bird" is used here. "Bestandsnaam" is translated: filename "Titel" is translated: title "Reeks" is translated: serie But as soon as i test the code it just shows the information like the image. But what i want to show is like this. Note image is photoshopped: ![]() On the regex tester it works perfect, but sadly on calibre it aint working. Does anyone got a idea why and what i am doing wrong? Last edited by kokkie20; 11-24-2020 at 05:25 AM. |
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
The problem is the underscores. The last line of the comment before the regex says, in English:
Quote:
Code:
^# MIST # (?P<series>[^-]+) |
|
![]() |
![]() |
![]() |
#4 | |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Nov 2020
Device: None
|
Quote:
![]() Sometimes i wonder how stupid i realy am.... Thank you again for the quick fix!!!! ![]() ![]() |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Importing azw3 books to Kindle from calibre quit working | tcreek | Library Management | 2 | 06-09-2018 08:25 AM |
Regex in importing help. | xd1986k | Library Management | 9 | 02-03-2015 10:42 AM |
Need a regex for importing books | flinkdeldinky | Calibre | 31 | 10-29-2011 08:31 AM |
Regex assistance request - importing books. | Belfaborac | Library Management | 2 | 10-24-2011 08:03 AM |
regex Issue when Importing | river | Calibre | 3 | 06-16-2009 11:03 AM |