03-29-2018, 06:56 PM | #1 |
Addict
Posts: 260
Karma: 139980
Join Date: Mar 2014
Device: Android
|
SOLVED: HELP needed with a RegExp -series in title
UPDATE: SOLVED as of post #6.
**************** I'm struggling to get the right combination and could use help here. I've looked an a number of threads on this and the "manual" or calibre, but I just cannot get the string combination correct. I simply want to copy TEXT from this type of pattern to another field. I just need the regular expression properly tweeked. This is the title (This is the series 5) This is the title ( This is the series 5) I just need a string that gets only the alphabet characters in the parentheses to copy to another field while ignoring any numeric expression. In this case, that would be "This is the series" . Of course, the quotes are just for here and not involved in the actual outcome. I'm aware of variations and caveats. I know how to deal with everything easily after that. I just need the proper string that will copy "This is the series" whether there is a space or not after the first "(". Please help. As soon as I think I have some of these expressions down, something doesn't work out, and I just cannot figure it myself. Thanks. Last edited by jecilop; 03-29-2018 at 10:27 PM. Reason: grammar, update |
03-29-2018, 08:04 PM | #2 |
Fanatic
Posts: 502
Karma: 2267928
Join Date: Nov 2015
Device: none
|
Try
Code:
.*\( *([^\d]*?) *\d+ *\).* |
03-29-2018, 09:08 PM | #3 |
Addict
Posts: 260
Karma: 139980
Join Date: Mar 2014
Device: Android
|
Thanks but it doesn't work.
I pasted it into the search field, but nothing results. |
03-29-2018, 09:34 PM | #4 |
Fanatic
Posts: 502
Karma: 2267928
Join Date: Nov 2015
Device: none
|
What do you have in the replace field?
|
03-29-2018, 09:45 PM | #5 |
Addict
Posts: 260
Karma: 139980
Join Date: Mar 2014
Device: Android
|
I have nothing typed in the Replace field.
|
03-29-2018, 10:10 PM | #6 |
Fanatic
Posts: 502
Karma: 2267928
Join Date: Nov 2015
Device: none
|
You have to use \1 there to extract the matched text.
|
03-29-2018, 10:21 PM | #7 |
Addict
Posts: 260
Karma: 139980
Join Date: Mar 2014
Device: Android
|
SUUUUHHHWEEEET! That did it.
THANK YOU! |
03-30-2018, 06:05 PM | #8 |
Addict
Posts: 260
Karma: 139980
Join Date: Mar 2014
Device: Android
|
@Sarmat89,
I tried something as a shortcut using this code and the \1 in the Replace field. I used it also on a title that did NOT have any info in the parentheses. Example 1) This is the title 2) This is the title ( This is the series 5) This resulted in a the first listing using "This is the title" while the second listing used "This is the series" (the latter being the original intention. I'm just curious if there is a way to make the code ONLY have a result IF there are ( ) present in the title such that listing one has no result. I can isolate the listings with ( ) easily to do this, but I'm just wondering if that step can be eliminated. |
03-31-2018, 09:05 AM | #9 |
Fanatic
Posts: 502
Karma: 2267928
Join Date: Nov 2015
Device: none
|
I doubt it can be done.
|
03-31-2018, 10:30 AM | #10 | |
Deviser
Posts: 2,265
Karma: 2090983
Join Date: Aug 2013
Location: Texas
Device: none
|
Quote:
jecilop: Yes, if you use the Job Spy toolbag of (currently) 46 tools for doing things like that to make using Calibre more effective and/or efficient and/or simple, or just if you want to have colors. See the 2 attachments below. The Auto-Add Books "Scrub Titles" tool came first, followed by the "Scrub Authors" tool. https://www.mobileread.com/forums/sh...42118#poststop DaltonST n.b. After reading everything else, this post might be useful to you: https://www.mobileread.com/forums/sh...7&postcount=17 |
|
03-31-2018, 12:20 PM | #11 |
Addict
Posts: 260
Karma: 139980
Join Date: Mar 2014
Device: Android
|
@DaltonST
Thanks. I will check this out. I didn't know about this plug-in. I will see what it can do for me. With this last post I've figured out how to automate with some assistance most of what I've needed (and gave up on). Now to conquer ( ) without numbers as in this post. |
Tags |
auto add, reg expressions, toolbag |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Metadata Plugboard to change title of same-title books in series for Kobo Touch | il_mix | Library Management | 5 | 03-15-2018 05:59 PM |
Convert Amazon Series names in Title to Calbre Series | ian-and-penny | Library Management | 4 | 09-04-2017 04:09 PM |
Title bulk edit match - to remove series info from title | Rob557 | Library Management | 30 | 12-09-2014 07:06 AM |
Plugboard "Metadata: Show series [series index] - title as title (Kindle)" | Deep Cover | Library Management | 6 | 11-30-2012 06:17 PM |
Regexp for series in books library | noimporta | Library Management | 14 | 05-05-2011 09:20 AM |