![]() |
#1 |
Enthusiast
![]() Posts: 47
Karma: 10
Join Date: Jul 2019
Device: none
|
Title to publisher sort
I've got books with titles for example "publisher1 - book title", "publisher2 - book title", "publisher3 - book title" etc. already imported into calibre. How would I go about using the Search and Replace function to search for all the characters before the "-" and then move them over to the publisher field?
|
![]() |
![]() |
![]() |
#2 | |
Enthusiast
![]() Posts: 47
Karma: 10
Join Date: Jul 2019
Device: none
|
Quote:
|
|
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,057
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Bulk mode S&R both use the same REGEX search search Title: (.+?)\s-\s(.+?) 1) Replace Publisher: \1 2) Replace Title: \2 |
|
![]() |
![]() |
![]() |
#4 |
Enthusiast
![]() Posts: 47
Karma: 10
Join Date: Jul 2019
Device: none
|
Tested it out but it doesn't seem to work right. With the title "publisher1 - book title" doing step one outputs "publisher1ook title" to the destination field publisher.
|
![]() |
![]() |
![]() |
#5 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,057
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Which should include everything up to: space dash space Is there a second space dash space in the Title field? |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Enthusiast
![]() Posts: 47
Karma: 10
Join Date: Jul 2019
Device: none
|
Quote:
Search mode: "Regular expression" Search field: "title" Search for: "(.+?)\s-\s(.+?)" Replace with: "\1" Destination field: "publisher" |
|
![]() |
![]() |
![]() |
#7 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,057
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
No quote marks in those terms?
I have no idea why the capture is grabbing that The destination WAS blank. (or set it to Replace)? |
![]() |
![]() |
![]() |
#8 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,725
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
|
![]() |
![]() |
![]() |
#9 | |
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
|
Quote:
Using the following might be safer: Code:
^(.+?)\s-\s(.+?)$ |
|
![]() |
![]() |
![]() |
#10 | |
Enthusiast
![]() Posts: 47
Karma: 10
Join Date: Jul 2019
Device: none
|
Quote:
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sort by Author doesn't then sort by title | jmcging | Library Management | 7 | 07-02-2017 10:16 PM |
title and title sort are omitting leading charcters | pinky62 | Library Management | 6 | 09-02-2016 03:18 AM |
'Title Sort' & 'Author Sort' Search/Report | Funkybassman | Calibre | 3 | 04-17-2016 12:31 PM |
Update 'title sort' and 'author sort' through CLI | wladdy | Library Management | 1 | 07-16-2015 05:12 PM |
How do I set sort title based on the title with multiple books? | loviedovie | Calibre | 2 | 02-09-2015 03:08 PM |