View Single Post
Old 03-04-2023, 05:57 AM   #4
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,450
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Tillomar View Post
I simplified my regexp expression to gain insight into what is causing the problem (one of serveral); so far, this one is the simplest expression that does also find titles w/o even any round bracket:
Code:
title:"~\([^()]*?\s+\d+\)"
(of course, the result is somewhat different from my original query...)

Currently, I feel that this must be some bug in calibre, but I would hate to bother the bug list if the problem sits in front of the keyboard.

Anyone?
Quote:
Originally Posted by kovidgoyal View Post
This will almost certainly be escaping issues. IIRC you need double backslashes. Start with something simple like

title:"~\\("

check that this finds titles with a ( in them.
Or try super-quotes. From the calibre manual:
Quote:
It is sometimes hard to get all the escapes right so the result is what you want, especially in regular expression and template searches. In these cases use the super-quote: """sequence of characters""". Super-quoted characters are used unchanged: no escape processing is done.
chaley is offline   Reply With Quote