![]() |
#1 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 515
Karma: 1470724
Join Date: Jul 2013
Location: Quebec CA
Device: android 4 (samsung tablet and asus tablet)
|
Some regex help to clean up authors
I am looking for a way to search for double initials in the author field.
I use [A-Z]\.[A-Z]\. to search for names like F.I. Jones but [A-Z][A-Z] matches almost everything. I can't seem to figure out how to look for FI Jones or AA Jones or AI Jones etc. My understanding from the manual was that [A-Z] searched only for capitals but in practice it seems to match either upper or lower case. I tested this by searching for [a-z][A-Z][a-z] on a library in the author field and almost all authors were displayed. Any ideas would be of help. I prefer to have all my author's initials displayes as I. I. Name or First I. Name etc. It makes author management easier. |
![]() |
![]() |
![]() |
#2 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,939
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:
quality check PI: Fix Author Initials:<selected format> is there to FIX |
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 515
Karma: 1470724
Join Date: Jul 2013
Location: Quebec CA
Device: android 4 (samsung tablet and asus tablet)
|
Thank you for the quick find for most initials problems.
I am still trying to figure out how regex in calibre search works as I use regular expressions a lot when editing html and it is logical to clean up titles and authors using it. For Instance, I really want to search for the case of "Aa " in authors as it occurs frequently enough that the second initial is mistakenly in lower case. I just am having a bit of a time getting the regex to match "Aa " versus darn near everything. For instance. How do I use regex to search for AA Name? If I use [A-Z][A-Z] [A-Z]. which I expect to match to AA Name it matches "Orbit Various Authors" and "Various Author" as well as the expected "AA Name". As two uppercase characters followed by a space, an uppercase character and then anything is how I translate the search string the results confuses me. I guess I'm looking for a lot more info about how regex works inside calibre as compared to in say edit pad pro. |
![]() |
![]() |
![]() |
#4 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,939
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:
(there are examples on the Help:GUI Search & Sort section |
|
![]() |
![]() |
![]() |
#5 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,364
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Code:
^[A-Z][A-Z] [A-Z] Note that the meaning of ^ is different when used inside [ ] characters. In that context it means "invert the set". For example, [^AB] means everything except A and B. |
|
![]() |
![]() |
Advert | |
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Little F&R RegEx help to clean a Calibre conversion | phossler | Sigil | 4 | 09-03-2012 08:17 PM |
Short Fiction Martinez, Brian: A Good Clean, A Harsh Clean. v1. PDF, 13th Dec 2010 | BrianMartinez | Other Books | 0 | 12-13-2010 09:27 PM |
Short Fiction Martinez, Brian: A Good Clean, A Harsh Clean. v1. 13th Dec 2010 | BrianMartinez | Kindle Books | 0 | 12-13-2010 09:25 PM |
Short Fiction Martinez, Brian: A Good Clean, A Harsh Clean. v1. 13th Dec 2010 | BrianMartinez | ePub Books | 0 | 12-13-2010 09:23 PM |
Short Fiction Authors, Various: Stories by Foreign Authors: Polish, Greek, Belgian. v1, 20 Feb 2008 | nrapallo | IMP Books (offline) | 0 | 02-22-2008 12:45 AM |