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 06-11-2013, 01:01 AM   #1
icychocolatechip
Junior Member
icychocolatechip began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jun 2013
Device: PC
Search expressions

Hello,

Sorry if this has been posted before, I couldn't find anything on the forum, and wasn't able to find what I need from stackoverflow or the python documentation. I want to create a Virtual library with tags "Fiction" but not "Young Adult". So I created a virtual library with "Fiction" as the requirement, and wanted to add in additional restrictions. But, I can't figure out how to search for tags: !=Young Adult properly. I've pretty much tried all possible placements of the quotes, as well as using <> instead of !=. I'm not really sure what else I can do.

Thank you in advance for your help!
icychocolatechip is offline   Reply With Quote
Old 06-11-2013, 01:30 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 26,465
Karma: 5383257
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
http://manual.calibre-ebook.com/gui....arch-interface
kovidgoyal is offline   Reply With Quote
Old 06-11-2013, 03:08 AM   #3
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,112
Karma: 780247
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
Although it is used in the examples I do not think that the documentation explicitly mentions that the word 'and', 'or' and 'not' are operators that can be used with search terms and that terms can be grouped using brackets.

In the OP request it appears the use of 'not' was missed in the things tried.
itimpi is offline   Reply With Quote
Old 06-11-2013, 03:14 AM   #4
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 8,909
Karma: 12755553
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7
Quote:
Originally Posted by icychocolatechip View Post
So I created a virtual library with "Fiction" as the requirement, and wanted to add in additional restrictions. But, I can't figure out how to search for tags: !=Young Adult properly. I've pretty much tried all possible placements of the quotes, as well as using <> instead of !=.
Try:
Code:
not tags:"=Young Adult" and tags:"=Fiction"
DoctorOhh is offline   Reply With Quote
Old 06-13-2013, 03:32 PM   #5
koliberek
Junior Member
koliberek began at the beginning.
 
Posts: 7
Karma: 10
Join Date: May 2013
Device: K3 (Keyboard)
There is something strange in regex search. I can't imagine how it works:



Pattern is in the beginning, in the middle or even as a part of word. And there is no any special character in the pattern! Is this the way it should work?
koliberek is offline   Reply With Quote
Old 06-13-2013, 05:23 PM   #6
chaley
"chaley", not "charley"
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: 5,927
Karma: 1673776
Join Date: Jan 2010
Location: France
Device: Many android devices
Quote:
Originally Posted by koliberek View Post
There is something strange in regex search. I can't imagine how it works:



Pattern is in the beginning, in the middle or even as a part of word. And there is no any special character in the pattern! Is this the way it should work?
Yes. An unanchored pattern will match any subpart of the item. That is what regexps do.

If you want to be sure that the pattern is matching the beginning, the end, or all of the item then you must include anchor specifications in the regexp. If you put the anchor ^ at the beginning of the regexp then the pattern must match at the beginning of the item. Of you put the anchor $ at the end of the regexp then the pattern must match the end of the item. Include them both to indicate you want both the beginning and the end, that is the entire item.
chaley is offline   Reply With Quote
Old 06-14-2013, 02:17 AM   #7
icychocolatechip
Junior Member
icychocolatechip began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jun 2013
Device: PC
Thank you very much for all the help. It worked out great =)
icychocolatechip is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Regular Expressions help deamonfruba Library Management 2 06-02-2012 03:09 AM
Regular Expressions littleezza Conversion 1 07-15-2011 12:52 PM
Another help with regular expressions encapuchado Library Management 6 06-21-2011 04:14 PM
Need help with expressions MMAC Library Management 2 04-25-2011 06:49 AM
Help with Regular Expressions ghostyjack Workshop 2 01-08-2010 12:04 PM


All times are GMT -4. The time now is 11:18 PM.


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