![]() |
#1 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 449
Karma: 3886916
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Pop_Os!, Jutoh, Kobo Forma
|
Editor Regex Saved Searches Now very "Greedy"
I just updated to 4.20 and immediately noticed that saved regex searches which I have been using for years now find way too much text, and are unpredictable. (Ubuntu 18.04)
For example, a searche for ' id=."*?"'. It has always found just each id string. Now it finds that string, and continues on until some random " way down in the file. Might be one paragraph down, might be at the end of the file. If I use it in the regular manual search box, it still works fine. Another example, searching for 'line-height:.*?;' in the css finds the first one, but then continues down to some ; further down. But it ignores some ;s - I can't figure out what is causing it to stop at some one instance instead of another. Again, if I do the search in the normal search box, it works perfectly. A third example: <div.*?> finds both <div class="calibre1"> and <div class="calibre5" id="calibre_pb_70"></div> in the saved search if I uncheck "dot amtches all". If I check that, it finds huge amounts of text, stopping at some random >. Again, it works fine when not saved. I've tried re-saving the searches...still the same. Anyone else seeing this? |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,322
Karma: 27111242
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Works for me with the following steps:
1) Click "add search" button 2) In the find box place <.+?> 3) Click done 4) On every click of Find only a single tag is selected, as expected. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 449
Karma: 3886916
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Pop_Os!, Jutoh, Kobo Forma
|
Well, there must be a ghost in my machine. Yesterday I had re-started Calibre, and even re-booted my machine, before posting the question. Today it behaves perfectly and I can't re-create what it was doing yesterday. Go figure.
Thank you Kovid, great software! |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
About saved searches and regex | Carpatos | Editor | 22 | 09-30-2020 10:56 PM |
Saved searches showing "0" hits | dgparryuk | Calibre | 3 | 09-27-2018 05:41 AM |
"saved searches" window not opening | user743 | Editor | 25 | 06-20-2014 12:07 AM |
High CPU usage when "saved searches" dialogue is opened | Ahmad Samir | Editor | 3 | 04-28-2014 07:53 AM |
"Settings," then "311" - Int'l Kindle searches for wireless providers in the area | Dr. Drib | Amazon Kindle | 2 | 08-28-2011 10:27 AM |