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

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 09-20-2018, 10:48 PM   #1
searcygr
Junior Member
searcygr began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Aug 2018
Device: none
Have a Regular Expression problem with Author Field

So, my son imported books into his Calibre library (using the latest version 3.31.0) and the Title was split across the title and author fields. For example: Vamps (Title) and Hollywood & Vein 01 (Author).

I am trying to use the Bulk Metadata Search/Replace to fix the problem. There are 800+ books that are affected and only the & in the title is causing a real problem.

In Search and replace Tab, I have the following:

Search Field: authors
Search For: ([A-Za-z\s\&].*)
Replace with: " \1" -- preceeding space required to display result properly with spaces
Destination field: title
Mode: Append to field
Split result (unchecked)
Values starting at 1 with values separated by :::

Book 1: Hollywood:::Vein 01 yields a test result of Vamps Hollywood Vein 01

Any ideas on what the Search for: should be (regular expression) to yield a
test result of Vamps Hollywood & Vein 01
???

Thanks in advance.
searcygr is offline   Reply With Quote
Old 09-21-2018, 01:38 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 33,485
Karma: 10205098
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
IIRC since & is a splitter for the author field so copying it in search replace is problematic. You could use a custom column built from other columns that uses the literal author value and then use that as the source instead of the authors field.

Or you can just re-read the metadata from inside the book files instead of the file names (the bulk metadata edit dialog has an option for that)
kovidgoyal is offline   Reply With Quote
Old 09-21-2018, 10:33 AM   #3
searcygr
Junior Member
searcygr began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Aug 2018
Device: none
I solved it. Everything is the same except I changed the following:
Search field: {template}
Template: {authors} <<-- Causes the entire author field to be picked up, ignores delimiters.
searcygr is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Please help me with regular expression :help: Tatjana Library Management 2 05-30-2014 05:41 PM
Regular expression: swap author firstname and lastname An_od Library Management 2 01-17-2013 10:55 AM
Regular Expression Help Azhad Calibre 86 09-27-2011 02:37 PM
Regular Expression Help iKarampa Calibre 13 12-15-2010 07:17 AM
Help with the regular expression Dysonco Calibre 9 03-22-2010 10:45 PM


All times are GMT -4. The time now is 07:21 PM.


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