|
![]() |
|
Thread Tools | Search this Thread |
![]() |
#1 | |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 167
Karma: 1497966
Join Date: Jul 2021
Device: N/A
|
[From Alinara] Need help to delete the first author in different books
Thread started in Saved Search/Regex Functions by Alinara and continued here:
it seems to me that a new and dedicated thread is a better place, since the other thread is for general solutions that may apply to more people. Quote:
In the first case, you should post in Library Management In the second case, did I understood correctly your problem: you've got (in an html file of your epub) the text: <p>John Doe ::: Janet Doodle</p> or: <p>John Albert Doe ::: Janet Eve Doodle</p> and you want as a result : <p>Janet Doodle</p> (or Janet Eve Doodle) Is it what you were meaning ? In that case, this works: Code:
search: (?:\w+\s*)+::+\s*((?:\w+\s)+(?:\w*)) replace: \1 Remark 2 : This is the global idea. You probably want to adapt the regex, for example : - to capitalize the first letter of each word - to match expressions only outside an html tag, as in: >(?:\w+\s*)+::+\s*((?:\w+\s)+(?:\w*))< - to match John A. Doe (it isn't catch by the actual regex) - The 2nd author must be limited by an html tag or a non-letter character (i.e. punctuation) If not, you'll have to know how to stop the capturing group Last edited by lomkiri; 02-15-2025 at 05:32 PM. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Search for books with author notes and show one book per author | chaley | Library Management | 63 | 12-18-2024 07:52 AM |
How to delete name of author from file name? | iDron | Library Management | 8 | 04-08-2017 09:19 PM |
author → author sort ∀ books ⇒ long time! | Geremia | Calibre | 2 | 04-17-2013 09:57 AM |