10-14-2022, 08:52 PM | #1 |
Junior Member
Posts: 4
Karma: 10
Join Date: Nov 2020
Device: Samsung Note 9, Calibre Companion, Moon+ Reader
|
Searching Library on Field Length
Hi!
I was wondering if it was possible to search the library on the length of a field. For instance: strlen(comment):<100 or len(author):>1 Does this functionality exist? Thanks! |
10-14-2022, 10:53 PM | #2 |
null operator (he/him)
Posts: 21,215
Karma: 29110326
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
See Search using templates in The search interface
The template language has a number of string functions ==>> Function reference BR |
10-14-2022, 11:00 PM | #3 |
Custom User Title
Posts: 9,855
Karma: 68367739
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
It may also be possible with a regex search.
|
10-15-2022, 07:16 AM | #4 |
Grand Sorcerer
Posts: 12,172
Karma: 7908995
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Yes, it is. Examples:
|
10-15-2022, 09:04 AM | #5 |
Chalut o/
Posts: 430
Karma: 145424
Join Date: Dec 2017
Device: Kobo
|
{50} alone work only for a text with an exact length of 50 character
for >=50 use {50,} for <=50 use {,50} |
10-15-2022, 09:12 AM | #6 | |
Grand Sorcerer
Posts: 12,172
Karma: 7908995
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
This screen capture shows it working using the expression '^.{5}' |
|
Tags |
calibre, functions, length, search, string |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Searching a yes/no field | ficbot | Calibre | 19 | 11-26-2015 01:44 AM |
Is there a limit to the length of the Authors field? | Inferno | Library Management | 4 | 07-25-2014 06:59 AM |
Field length for first filename too long | djstormer | ePub | 3 | 09-29-2012 09:45 PM |
Saved Search field length size | Sabardeyn | Library Management | 1 | 11-12-2011 10:36 PM |
Searching on Ratings Field | nynaevelan | Calibre | 3 | 05-29-2010 06:44 PM |