![]() |
#1 |
Enthusiast
![]() Posts: 27
Karma: 10
Join Date: Nov 2010
Device: kindle
|
How to get out of "Title" 1 part of "Author"
Now :
Author : Unknown Title : Isaac Asimov@Pebble in the Sky It should be like this : Author : Isaac Asimov Title : Pebble in the Sky How to get out of "Title" 1 part of "Author" Specifically, I mistakenly put a book into the title, which now looks to me in the title: Author@Title (@ me used to separate) and I would like to transfer the Author to its place now from the Title and to stay the rest in the Title as it should? English is not the best for me. |
![]() |
![]() |
![]() |
#2 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,698
Karma: 212939160
Join Date: Jan 2014
Location: Estonia
Device: Kobo Sage & Libra 2
|
Um... copy/paste? Or do you mean in bulk for several books?
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Enthusiast
![]() Posts: 27
Karma: 10
Join Date: Nov 2010
Device: kindle
|
Sure for bulk . 350 books.
|
![]() |
![]() |
![]() |
#4 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,651
Karma: 50383856
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Bulk mode in the Metadata editor: Search and replace
Assumes all are like this: Title : Isaac Asimov@Pebble in the Sky Not tested REGEX MODE use the right side to see all is good 2 Passes. The first copies the Author to its proper place Search Title: Code:
(.+?)\@(.+) Replace with: \1 The 2nd cleans up Same search Destination field: Title Replace with: \2 |
![]() |
![]() |
![]() |
#5 |
Enthusiast
![]() Posts: 27
Karma: 10
Join Date: Nov 2010
Device: kindle
|
What to say except many thank you - it works right!
If you could only briefly explain a little Code: (.+?) \@(.+) Replace with: \1 or 2 Yes I don't have to read everything about Regex ![]() |
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,651
Karma: 50383856
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
.+ is a general wildcard. the ? makes it less greedy ![]() \@ is just the escaped @ (escape eliminates any other meaning) So Capture pattern #1 matches up to the @ and stops Capture 2 is all the rest the \# is what was captured. so you designate which goes where and in the case of part 2, get tossed because you replaced Title with just #2 |
|
![]() |
![]() |
![]() |
#7 |
Enthusiast
![]() Posts: 27
Karma: 10
Join Date: Nov 2010
Device: kindle
|
Thank you very much.
Given that the best way to learn is through examples, I will probably remember this (and write it down). |
![]() |
![]() |
![]() |
#8 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,651
Karma: 50383856
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
What we need can usually be done with simple REGEX. Also We use the PCRE flavor |
|
![]() |
![]() |
![]() |
#9 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 657
Karma: 2727776
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
Try this beginners tutorial. Its where I started a couple of years ago...
https://regexone.com/lesson/introduction_abcs |
![]() |
![]() |
![]() |
#10 |
Enthusiast
![]() Posts: 27
Karma: 10
Join Date: Nov 2010
Device: kindle
|
Thank you both for the answers, really.
![]() |
![]() |
![]() |
![]() |
#11 |
Enthusiast
![]() Posts: 27
Karma: 10
Join Date: Nov 2010
Device: kindle
|
When start
![]() How merge 2 strings to 1 string - like : Isaac Asimov Pebble Sky.pdf (strings #1 #2 #3 #4) to Author : Isaac Asimov (string #1 + #2) Title : Pebble in the Sky (string #3 + #4) Don't have separator . |
![]() |
![]() |
![]() |
#12 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,651
Karma: 50383856
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
ASSUMES
![]() (.+\s.+?)\s(.+) Author is \1 Title is \2 No need to treat as 4 parts \1=Anything space anything \2=Everything else If it has a Mi (but full name) (.+\s*.\.\w\s+?)\s(.+) the first \s allows for no space |
![]() |
![]() |
![]() |
#13 |
Enthusiast
![]() Posts: 27
Karma: 10
Join Date: Nov 2010
Device: kindle
|
S field -- > Title
Search : (.+\s.+?)\s(.+) R with --> \1 TEST: Isaac Asimov Pebble Sky.pdf ---> Isaac Asimov Pebble S field -- > Title Search : (.+\s.+?)\s(.+) R with --> \2 TEST: Isaac Asimov Pebble Sky.pdf ---> Sky.pdf |
![]() |
![]() |
![]() |
#14 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,651
Karma: 50383856
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Makes me think the that is not a space in the authors name
Try this for the first capture (\w\s\w) Also make sure Case Sensitive is not ticked |
![]() |
![]() |
![]() |
#15 |
Enthusiast
![]() Posts: 27
Karma: 10
Join Date: Nov 2010
Device: kindle
|
Test:
Isaac Asimov Steel ---> result is ok : (\1) Author : Isaac Asimov (\2) Title : Steel but Isaac Asimov Steel of Iron is not OK ( \1) Author : Isaac Asimov Steel of (\2) Title : Iron |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Deducing "Author sort" and "Title sort" through CLI | wladdy | Library Management | 8 | 08-04-2020 05:20 AM |
Remove "Author" from "Title" field | ctop | Library Management | 0 | 02-25-2020 10:19 PM |
Use "short" instead of "full" title for title sort & renaming? | wolpi | Library Management | 2 | 08-04-2016 05:25 PM |
A warning for Linux users: slow "Add Books", "Unknown" title and Author | rolgiati | Library Management | 8 | 07-24-2013 04:36 PM |