Skip to content

Find & Replace Broken w/ Regex Lookaround #2360

@sampalmer

Description

@sampalmer

Description of the Issue

When doing a Find & Replace using a regular expression with a lookahead or lookbehind, the "replace" button may fail to work.

Steps to Reproduce the Issue

  1. Open a blank Notepad++ tab
  2. Insert the following text ,NULL,NULL
  3. Open the Find & Replace dialog
  4. Put this in the find box: (?<=,)NULL
  5. Set "Search Mode" to "Regular expression"
  6. Press "Replace" multiple times

Expected Behavior

The "Replace" button should result in the current match being replaced with the specified replacement text.

Actual Behavior

The "Replace" button didn't perform any replacement, but instead moved to the next match.

Debug Information

Notepad++ v7 (32-bit)
Build time : Sep 21 2016 - 22:00:56
Path : C:\Program Files (x86)\Notepad++\notepad++.exe
Admin mode : ON
Local Conf mode : OFF
OS : Windows 10
Plugins : mimeTools.dll NppConverter.dll NppExport.dll PluginManager.dll

Note that this doesn't occur when you press "Replace All"; it's specific to the "Replace" button.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions