03-03-2016, 06:36 PM | #1 |
Enthusiast
Posts: 34
Karma: 10
Join Date: Oct 2002
Location: AK
|
Regular Expressions search in Book Viewer
I regularly use the regex capability of the Quality Check plugin to find books. However, once I have the list of books matching the pattern, I don't see a way to find the match within each book since Book Viewer doesn't, to my knowledge, support RegEx in its search.
For example, I search my whole library for: Code:
\ssough\s Code:
sough Is there a way to use a RegEx search on an individual book's text? |
03-03-2016, 11:29 PM | #2 |
creator of calibre
Posts: 44,526
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
No, there isn't. Search in the viewer is run using qt webkit, and it has no facility for regexes. Youcan convert your book to txt and run your query on the txt file using your favorite txt editor instead.
|
Advert | |
|
03-03-2016, 11:44 PM | #3 |
Well trained by Cats
Posts: 30,442
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Or use the Book Editor (all text files scope), Just don't SAVE when done
|
03-04-2016, 12:03 AM | #4 |
creator of calibre
Posts: 44,526
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You cant use the book editor as there it searches in the code view, which means you cannot match text that spans multiple html tags.
|
03-04-2016, 12:46 PM | #5 |
Enthusiast
Posts: 34
Karma: 10
Join Date: Oct 2002
Location: AK
|
Bummer. Thanks. Converting to text and searching would be sadly slower than repetitively clicking to find the "right" match (I do this multiple times a week often through scores of books each time). And thanks (kind of for the note about the book editor search...saves me some time trying to figure out why that didn't work when I'd attempted to search that way.
|
Advert | |
|
03-04-2016, 05:52 PM | #6 |
null operator (he/him)
Posts: 20,995
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
@fncll - FWIW and only appropriate if you search for the same thing in multiple books.
I ensure all my books have a format that my desktop search tool can handle, most recently that's primarily been Windows Search, which has improved over time. I am currently trialling X1 - impressive, not free though. BR |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Need help with regular expressions | davy39 | Library Management | 0 | 10-16-2015 05:11 AM |
Help with regular expressions | MostlyCarbon | Library Management | 0 | 02-04-2012 04:00 PM |
Regular Expressions | geormes | Calibre | 4 | 08-04-2011 08:09 AM |
Help with regular expressions | jevonbrady | Library Management | 6 | 06-21-2011 11:16 AM |
Custom Regular Expressions for adding book information | bigbot3 | Calibre | 1 | 12-25-2010 07:28 PM |