-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Description
Is there an existing issue for this?
- I have searched the existing issues
Is the issue reproducible in Notepad++ without plugin?
- I have tried Notepad++ without plugin
Is the issue reproducible in portable version of Notepad++?
- I have tried portable version of Notepad++
Does the issue affect SciTE?
- I have tried SciTE
Description of the Issue
When using Find in 'Regular expression' Search Mode, v8.8.5 always finds my expected text, but v8.8.6 sometimes finds nothing with exactly the same file and (apparently) exactly the same search string.
Steps To Reproduce
- Launch Notepad v8.8.6 or 7 or 8
- In a new tab, type one line of text, but do not press RETURN
- Select the text by clicking its line number on the left-hand side
- Copy the text (e.g. Ctrl-C)
- Bring up the Find dialog (e.g. Ctrl-F)
- Paste the text into the 'Find what' box (e.g. Ctrl-V)
- Select the Search Mode radio button 'Regular expression'
- Press the button 'Find All in Current Document'
- Observe the Search results indicate the mode was [RegEx.] as expected
- Now edit the text by pressing RETURN so the file is identical but has a new blank 2nd line
- Repeat steps 3-8
- Observe this time the Search results indicate the mode was unexpectedly [Extended]
- Reopen the Find dialog
- Observe the selected Search Mode radio button is Extended
Current Behavior
When searching for complex regular expressions in downloaded Ancestry text files (GEDCOM), zero results can sometimes be returned in v8.8.6 when v8.8.5 returned normal results. Example search string:
^(?=1 NAME)(?:(?!^0).)*^1 RESI.^2 DATE[\s0-9a-z]*1871(?:(?!^0|^1 RESI.^2 DATE[\s0-9a-z]1881).)^1 RESI.^2 DATE[\s0-9a-z]*1891
Expected Behavior
The issue appears to be caused by the presence of an end-of-line character in the search string. My search strings are complex, so are saved in a text file and copy and paste them into the Find dialog when needed. In the past, I've always quickly selected the search string to be copied by clicking its line number on the left: this selects the entire line PLUS an end-of-line character (i.e. the cursor is now at the start of the following line). This has not caused problems before. But from v8.8.6 the Find operation is misbehaving as described. (The v8.8.6 change log mentions changes to 'Find/Replace fields' so perhaps it is to do with this.)
Debug Information
Notepad++ v8.8.6 (64-bit)
Build time: Oct 7 2025 - 13:44:28
Scintilla/Lexilla included: 5.5.7/5.4.5
Boost Regex included: 1_85
Path: C:\Program Files\Notepad++\notepad++.exe
Command Line:
Admin mode: OFF
Local Conf mode: OFF
Cloud Config: OFF
Periodic Backup: OFF
Placeholders: OFF
Scintilla Rendering Mode: SC_TECHNOLOGY_DEFAULT (0)
Multi-instance Mode: multiInstOnSession
asNotepad: OFF
File Status Auto-Detection: cdEnabledNew (for current file/tab only)
Dark Mode: OFF
Display Info:
primary monitor: 1920x1080, scaling 100%
visible monitors count: 1
installed Display Class adapters:
0001: Description - Intel(R) HD Graphics 4600
0001: DriverVersion - 20.19.15.4624
0002: Description - NVIDIA GeForce GTX 750 Ti
0002: DriverVersion - 32.0.15.6094
OS Name: Windows 10 Pro (64-bit)
OS Version: 22H2
OS Build: 19045.6575
Current ANSI codepage: 1252
Plugins:
DSpellCheck (1.5)
mimeTools (3.1)
NppConverter (4.7)
NppExport (0.4)
NppTextFX (1.4.1)Anything else?
A v8.8.8 workaround for now would be to select the search string without an end-of-line character (making sure the cursor is at the end of the wanted line and not the start of the next line). But, for me, v8.8.5 is fine for now.