Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 05-17-2022, 09:22 AM   #1
iamagloworm
Connoisseur
iamagloworm began at the beginning.
 
Posts: 59
Karma: 10
Join Date: Apr 2013
Device: Kindle Paperwhite 3 (Manga)
Regex for title including brackets

I have been pulling my hair out to get this to work. What is the correct regex to filter titles with brackets?

This one does not work:

Code:
title:"~(.*)\((.*)\)"
iamagloworm is offline   Reply With Quote
Old 05-17-2022, 09:29 AM   #2
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: 11,733
Karma: 6690881
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
You want to search for a title containing matching parentheses? If so, then this:
Code:
title:"~\\(.*\\)"
For why you need two backslashes, see The search interface:
Quote:
Note that backslashes used to escape special characters in regular expressions must be doubled because single backslashes will be removed during query parsing. For example, to match a literal parenthesis you must enter \\(. Regular expression searches are ‘contains’ searches unless the expression contains anchors.
chaley is offline   Reply With Quote
Reply

Tags
regex

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Nook GL+ - Title not including series for just a couple books charles_cinci Devices 1 05-26-2019 09:41 PM
RegEx-Putting pub. date after first sentence in title if two or more sentenced title font332 Library Management 0 08-17-2017 08:49 AM
Help with RegEx to parse title with colon racergirl76 Library Management 3 02-16-2016 02:13 AM
Square brackets in filename breaking Calibre Regex? ccsrsj Library Management 2 06-02-2012 07:38 AM
how to have regex dot match any character including newline? gnychis Calibre 5 11-30-2010 06:35 PM


All times are GMT -4. The time now is 05:21 PM.


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