How to delete duplicate lines ?
-
i am wondering how to delete duplicate lines in notepad++
for example
1
1
2
3
3
4
4
4result
2 -
find:
^(\d+)(\R\1)+\R
replace: nothing
search mode: regular expression -
@alan-kilborn
its not worked, if i have many lines, 5 millions data
i would like to delete duplicate dataa
a
b
c
c
c
d
d
d
d
e
f
f
g
h
h
hresult expected
b
e
g -
@bolapedia-gg said in How to delete duplicate lines ?:
its not worked
Did you try it on the data you originally supplied?
-
@bolapedia-gg
This regex does the transformation:(^.*?\R)\1+But first go to the end of the file and make sure there is one blank line at the end. (If this isn’t satisfactory I’m pretty sure there’s a way to fix that).
-
@neil-schipper said in How to delete duplicate lines ?:
I’m pretty sure there’s a way to fix that).
(?-s)^(.+)(?:\R\1)+(\R|\z)Use
*instead of+if it is desired to remove duplicate contiguous empty lines. -
This post is deleted!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login