Skip to content

search for newline fails when in RexEx term within brackets, once you reached empty line section #13393

@gnrshnk

Description

@gnrshnk

Description of the Issue

RegEx search for newline within brackets fails when (and only when) file contains empty lines

Steps to Reproduce the Issue

  1. Have an document open, which has text in every line (no empty lines) in the upper part and empty lines in the lower part.
  2. set line endings to UNIX. (The error is exactly the same with Windows or Macintosh line endings, just that the RegEx code is slightly different)
  3. go to search, set search mode to regex.
  4. search for (without quotation marks) "(\n)+"

Expected Behavior

The search will find every line endings (each at a once). Once we reached the section with multiple lines, the search will find the entire blocks of empty lines. The search result will be exactly the same as if you were searching for (without quotation marks) "\n+". (By searching for \n+ instead of (\n)+, the search works just fine and the error doesn't appear.)

Actual Behavior

the search works fine, as long as you haven't reached the section with the empty lines. One you reached the section with the empty lines, search prompts an error, telling you you were using as "invalid expression".

Debug Information

Notepad++ v8.5 (64-bit)
Build time : Mar 6 2023 - 02:18:13
Path : C:\Program Files\Notepad++\notepad++.exe
Command Line : "D:\oracle\admin\LCM\dpdump\import.log"
Admin mode : ON
Local Conf mode : OFF
Cloud Config : OFF
OS Name : Windows Server 2019 Standard (64-bit)
OS Version : 1809
OS Build : 17763.1158
Current ANSI codepage : 1252
Plugins :
mimeTools (2.9)
NppConverter (4.5)
NppExport (0.4)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions