![]() |
#1 |
Enthusiast
![]() Posts: 30
Karma: 10
Join Date: Sep 2014
Device: none
|
Search for first author_sort entry starting with letter x
I've been using searches like this for a while:
Code:
author_sort:"~(^[AaBbCcDd])|(&\s*[AaBbCcDd])" |
![]() |
![]() |
![]() |
#2 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
????
Why not just prune the extra: Code:
|(&\s*[AaBbCcDd] Also, the search is case-insensitive. You could just use the set [A-D] |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Enthusiast
![]() Posts: 30
Karma: 10
Join Date: Sep 2014
Device: none
|
Thanks for the info, eschwartz! Makes me feel pretty stupid - I should have seen that I was using a combination of two expressions in my searches. I copied the search string from some website and never bothered with trying to understand how the expression works - RegEx is still pretty alien to me (; .
|
![]() |
![]() |
![]() |
#4 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Well, if you haven't had the opportunity to get a grounding in regex before, then you don't have to feel bad about not knowing it.
![]() But since regex is pretty cool, and there's a lot of cool stuff you can do with it, I encourage you to take a look at the following tutorial -- it's the one that taught me everything I know: http://www.regular-expressions.info/ One of the most valuable things it does ![]() Last edited by eschwartz; 10-13-2015 at 02:48 AM. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
New Column for Author_Sort? | hurricane51 | Library Management | 5 | 01-25-2024 06:24 PM |
author_sort | Jorge Junior | Library Management | 3 | 11-12-2012 10:20 AM |
Problems with author_sort | Poldi | Calibre | 1 | 10-26-2012 07:31 AM |
restore previous search box entry on restart | cybmole | Calibre | 2 | 11-22-2011 04:07 AM |
What am I missing? (author_sort) | megachirops | Calibre | 12 | 09-06-2010 11:15 AM |