Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 05-16-2022, 03:42 PM   #1
blar
Junior Member
blar began at the beginning.
 
Posts: 9
Karma: 10
Join Date: May 2021
Device: Kobo Clara HD
Regex search for year read

Hi, I gather that I need to do something with regex for this but it makes my head spin and none of my guesses have worked. In my custom #review column, I input the days that I read something in the following format:

[First read, DD MM YYYY to DD MM YYYY]

With "first" changing accordingly. I then follow this up with my thoughts after that particular reading.

I would like to create a set of saved searches for the years that I've got this data, so that I can find all books that I finished in the year 2019, say. I can do this somewhat with the search #review:2019, but this includes books that were started in 2019 but not finished that year. And of course if I mention a year or even just a number that looks like a year in the text of a review, that will show up as well.

I'm just wondering how to phrase the search expression so that it only catches the year in the format that I use.
blar is offline   Reply With Quote
Old 05-16-2022, 04:59 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,023
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
You used a text field so standard date ranges will not work
example for 2015-2016

Code:
#review:first read\,>=\d\d \d\d 2015 and #review:first read\,<= \d\d \d\d 2016
Note the text

So you need the field name: #review:
you need the words with comma: first read\,
you need wild cards for all non critical digits \d\d\s\d\d\s
then the actual 4 digit year

Another way for the year part if consecutive
Code:
#review:first read\,>=\d\d \d\d 201[5-6]
theducks is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Regex Search in Advanced Search Box franknight Library Management 2 07-08-2020 11:42 PM
Search is a regex?? drawson1 Library Management 4 12-21-2017 09:57 PM
Regex in search problems (NOT Search&Replace; the search bar) lairdb Calibre 3 03-15-2017 07:10 PM
Regex Search doesn't search all files in Edit Book GregTheGrate Editor 8 11-08-2016 12:47 AM
Help with RegEx - add Year as Tag item puterdude Library Management 0 01-20-2012 03:06 PM


All times are GMT -4. The time now is 05:40 AM.


MobileRead.com is a privately owned, operated and funded community.