diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index f8ee0796e..2469882d3 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -1414,7 +1414,7 @@ void Notepad_plus::removeDuplicateLines() _findReplaceDlg.processAll(ProcessReplaceAll, &env, true); // remove the last line if it's a duplicate line. - env._str2Search = TEXT("^(.+)\\r?\\n(\\1)"); + env._str2Search = TEXT("^(.+)\\r?\\n(\\1)$"); env._str4Replace = TEXT("\\1"); env._searchType = FindRegex; _findReplaceDlg.processAll(ProcessReplaceAll, &env, true);