REGEX anchors "^", "\A", and "\`" do not always work correct

Started by epfax, September 06, 2017, 04:31:29 PM

Previous topic - Next topic

epfax

I wanted to select the first n characters in the next some lines so I tried by REGEX:
[attachimg=1]

Example:
I put the cursor at the start of the file, and click Find next:
[attachimg=2]
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:
[attachimg=3]
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:
[attachimg=4]

Kind regards
Eckart

epfax

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.

alex

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.
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]