![]() |
#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! |
![]() |
![]() |
![]() |
#2 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 20,781
Karma: 27405072
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 |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,051
Karma: 62040591
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
It may also be possible with a regex search.
|
![]() |
![]() |
![]() |
#4 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,864
Karma: 7036239
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Yes, it is. Examples:
|
![]() |
![]() |
![]() |
#5 |
Chalut o/
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 413
Karma: 145324
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} |
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,864
Karma: 7036239
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 |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Searching a yes/no field | ficbot | Calibre | 19 | 11-26-2015 12:44 AM |
Is there a limit to the length of the Authors field? | Inferno | Library Management | 4 | 07-25-2014 05:59 AM |
Field length for first filename too long | djstormer | ePub | 3 | 09-29-2012 08:45 PM |
Saved Search field length size | Sabardeyn | Library Management | 1 | 11-12-2011 09:36 PM |
Searching on Ratings Field | nynaevelan | Calibre | 3 | 05-29-2010 05:44 PM |