|
|
@ -1408,13 +1408,13 @@ void Notepad_plus::removeDuplicateLines()
|
|
|
|
// whichPart : line head or line tail
|
|
|
|
// whichPart : line head or line tail
|
|
|
|
FindOption env;
|
|
|
|
FindOption env;
|
|
|
|
|
|
|
|
|
|
|
|
env._str2Search = TEXT("^(.*\\r?\\n)(\\1)+");
|
|
|
|
env._str2Search = TEXT("^(.*(\\r?\\n|\\r))(\\1)+");
|
|
|
|
env._str4Replace = TEXT("\\1");
|
|
|
|
env._str4Replace = TEXT("\\1");
|
|
|
|
env._searchType = FindRegex;
|
|
|
|
env._searchType = FindRegex;
|
|
|
|
_findReplaceDlg.processAll(ProcessReplaceAll, &env, true);
|
|
|
|
_findReplaceDlg.processAll(ProcessReplaceAll, &env, true);
|
|
|
|
|
|
|
|
|
|
|
|
// remove the last line if it's a duplicate line.
|
|
|
|
// remove the last line if it's a duplicate line.
|
|
|
|
env._str2Search = TEXT("^(.+)\\r?\\n(\\1)$");
|
|
|
|
env._str2Search = TEXT("^(.+)(\\r?\\n|\\r)(\\1)$");
|
|
|
|
env._str4Replace = TEXT("\\1");
|
|
|
|
env._str4Replace = TEXT("\\1");
|
|
|
|
env._searchType = FindRegex;
|
|
|
|
env._searchType = FindRegex;
|
|
|
|
_findReplaceDlg.processAll(ProcessReplaceAll, &env, true);
|
|
|
|
_findReplaceDlg.processAll(ProcessReplaceAll, &env, true);
|
|
|
|