Problems with searching using regular expressions

Yury Dubinsky <[email protected]> Wed, 28 Feb 2024 20:00:14 -0800 (PST)
Newsgroups gmane.editors.scite.general
Message-ID <[email protected]>
Hello, Neil,
I found a few problems with regular expression searches in Scite when I was 
trying to quickly bookmark and remove all the blank lines in a file. 
(There's nothing special about the file, but I've attached it for 
convenience.) I am talking about the following expressions: empty and blank 
lines - ^$ ,^\s*$ and just demos: ^.*$ , ,$ , ^
Here are the facts found.
1. Applies to Scite starting from 4.05.

   - " Find Next" does not work with ^$ , ^.*$ , $ , ^ after the first 
   found occurrence.
   -  With ^\s*$ "Find Next" works for blank lines, but stops at the empty 
   line (*$). See attached screenshot 1. Find Next stopped on line 3.
   -  For all the expressions mentioned, Scite can "Bookmark All", however 
   there is another problem mentioned in item 3.

2. Applies to Scite older than 4.05. "Find Next" works well with all of the 
expressions above except ^. Here, "Find Next" works on empty strings (^$), 
but does not work after non-empty strings.
3. Affects any version of Scite, problem with "Bookmark All" using one of 
the expressions above. Scite does not bookmark all the required lines. See 
attached screenshots 2 and 3. (My intention was to bookmark all empty lines 
using ^$ in the attached file.) The behaviour is strange. For example, when 
we scroll to the bottom of an attached file and call "bookmark all" with 
^$, the top lines will not be marked. The number of lines with bookmarks 
depends on the scroll position when calling “Bookmark All”. (It is possible 
to bookmark all the lines. We need to scroll through the file and use the 
command again and again. But this requires a lot of attention.)
I don't thing this issue is a priority. There are often many other editors 
around. But I use SciTE on remote servers where the software installation 
policy is very strict. Then I only have Scite.
I've never looked into Scite's implementation of regular expressions. 
Before looking, I would like to check with you.
Thanks,
 Yury

-- 
You received this message because you are subscribed to the Google Groups "scite-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/scite-interest/bcbed36a-b33f-447f-8015-3aa01e88c4b6n%40googlegroups.com.
Screenshot3.png (image/png, 8.4 KB) - not displayed
copy-output-count1.txt (text/plain, 495 B)


       468




       162




        18




     16559




      3953




     13880




      8665




     29169




   1138141




      6497




       164




      4636




     16381




     52298




       172




   8914110




     22092




       313




    117445




     14019




     29242




     21571




      3535




      9786




    578727




        43




   2207596




      3514




      3441




        34




      3590




       156




        53
Screenshot1.png (image/png, 7.2 KB) - not displayed
Screenshot2.png (image/png, 13 KB) - not displayed