Good day. Found the following.
Geany: Geany 1.34.1, Russian_Russia.1251 Geany: GTK 2.24.32, GLib 2.58.1
**1.** Consider the following plain text:
``` 123
456
```
After 123 follow five empty lines, field 456 follows one empty line.
**2.** Open **Search/Find** **Search for**: `(?s)^(.*)\n(.*\1)` **Replace for**: `\2` [v] Use regular expressions [v] Use multi-line matching
**3**. Repeat pressed button "In document" while replace not stoped and get next text: ``` 123
456
```
**4.** Create a new empty file and paste the text from step 3
**5.** Repeat the procedure from steps 2 and 3. The line between 123 and 456 will be deleted. Can you tell me what is wrong?
Can you tell me what is wrong?
Looks correct to me, what did you expect it to do?
Can you tell me what is wrong?
Looks correct to me, what did you expect it to do?
I expect all blank lines to be deleted as in step 5.
If you run the search and replace again _from the start of the document_ it does remove the remaining newlines.
I tried to do it, but it does not work. This is only possible if you are creating a new file and inserting text to replace it again.
Works for me?
Try on this [file](https://drive.google.com/file/d/1mhfeNKW195Gb2oIxTNcU9invh--w57L5/view?usp=s...).
Your file has CRLF line endings, but you only match LF (`\n`) so you leave several CRs in the file, do `View->Show Line Endings` to see whats happening.
Closed #2096.
Thanks, now everything works as it should.
github-comments@lists.geany.org