Author Topic: Does HE have function like Sublime "ctrl + p" called search file in project  (Read 1215 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
13 Replies
4580 Views
Last post April 18, 2009, 08:10:43 pm
by Arthur
6 Replies
5391 Views
Last post November 02, 2009, 11:12:18 pm
by alex
1 Replies
1804 Views
Last post March 01, 2013, 12:04:39 am
by alex
4 Replies
2047 Views
Last post June 24, 2015, 11:31:07 am
by alex
2 Replies
879 Views
Last post September 08, 2017, 10:15:18 am
by alex