Author Topic: Зависает при "Find" и при "Replace"  (Read 1231 times)

Offline epfax

  • Newbie
  • *
  • Posts: 5
  • Karma: +1/-0
    • View Profile
REGEX anchors "^", "\A", and "\`" do not always work correct
« on: September 06, 2017, 03:31:29 pm »
I wanted to select the first n characters in the next some lines so I tried by REGEX:


Example:
I put the cursor at the start of the file, and click Find next:

OK

Then I click one more time Find next. My regular expression should select the first 7 characters of the second line. What it did was:

not OK

I played with it and found out that if I set Scope from "Document" to "Open Documents", then it works the way it was expected to! And more, when I select "Mark Search Results in Text" and click  Find All, it also works right, no matter what Scope is set to:


Kind regards
Eckart

Offline epfax

  • Newbie
  • *
  • Posts: 5
  • Karma: +1/-0
    • View Profile
Re: REGEX anchors "^", "\A", and "\`" do not always work correct
« Reply #1 on: September 06, 2017, 03:39:22 pm »
Yes, I almost forgot to mention: I observed the same strange thing with the regular expressions or anchors "\A", and "\`" (match at the start of a buffer only) accordingly.

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2181
  • Karma: +37/-3
    • View Profile
    • HippoEDIT
Re: REGEX anchors "^", "\A", and "\`" do not always work correct
« Reply #2 on: September 08, 2017, 10:15:18 am »
Hi Eckart,

yes, reproduced. Thanks for the bug report, I will fix it in the new beta.
The issue is probably, that search starts in the second time, not from the beginning of the line, but from your cursor position, and logic recognize it as a buffer, line start.

BR, Alex.

 

Related Topics

  Subject / Started by Replies Last post
5 Replies
2989 Views
Last post February 15, 2009, 04:28:32 pm
by alex
6 Replies
5388 Views
Last post November 02, 2009, 11:12:18 pm
by alex
6 Replies
2900 Views
Last post August 24, 2011, 05:08:07 pm
by false007
4 Replies
2041 Views
Last post June 24, 2015, 11:31:07 am
by alex
2 Replies
869 Views
Last post September 08, 2017, 10:15:18 am
by alex