Notepad: how to remove duplicated words between 2 values?

pacocan2

Regular Member
Joined
Oct 28, 2015
Messages
255
Reaction score
45
hello,

i have a lot of instagram profile id/username/pic url like:

((xxxxx,ttttt,wwwww,xxxxx), ((hhhhh,sssss,gggg,jjjjjjj)),(xxxxx,ttttt,wwwww,xxxxx))

How can i remove duplicates? profile 1 is same as profile 2. so i want it to search between (( and ))

if it find any same value, it must remove it

hope somebody can help me
 
anyone please? maybe this is better:


I have 100.000 lines with information like:
K1xxxxx,ttttt,wwwww,xxxxxK2,
K1hhhhh,sssss,gggg,jjjjjjjK2,
K1xxxxx,ttttt,wwwww,xxxxxK2

I want the result as:
K1xxxxx,ttttt,wwwww,xxxxxK2,
K1hhhhh,sssss,gggg,jjjjjjjK2,

As you see line 1 and line 3 are duplicated. I want to delete all duplicated between K1 and K2.
How can I do this in notepad?
 
do you use notepad++? if yes you can use regex

You can also learn how regex works here https :/ /regexr . com/


in notepad++

check option "Find Next", "Match Case", "Wrap Around"

Search Mode: Reguler Expression

and click Replace All
 
In notepad++

try this

1.sort line with Edit -> Line Operations -> Sort Lines Lexicographically ascending
2.do a Find / Replace:
Find What: ^(.*?)$\s+?^(?=.*^\1$)
Replace with: (Nothing, leave empty)
Check Regular Expression in the lower left
Click Replace All
 
If you need this feature too much, I suggest you look for a program.
 
In notepad++

try this

1.sort line with Edit -> Line Operations -> Sort Lines Lexicographically ascending
2.do a Find / Replace:
Find What: ^(.*?)$\s+?^(?=.*^\1$)
Replace with: (Nothing, leave empty)
Check Regular Expression in the lower left
Click Replace All
nothing happens?
 
nothing happens?
K1xxxxx,ttttt,wwwww,xxxxxK2,
K1hhhhh,sssss,gggg,jjjjjjjK2,
K1xxxxx,ttttt,wwwww,xxxxxK2,

3 line end with comma (,)

I tried above string in my notepad++

1.sort line with Edit -> Line Operations -> Sort Lines Lexicographically ascending
2.do a Find / Replace:
Find What: ^(.*?)$\s+?^(?=.*^\1$)
Replace with: (Nothing, leave empty)
Check Regular Expression in the lower left and click matches new line
Click Replace All

result
===========

K1hhhhh,sssss,gggg,jjjjjjjK2,
K1xxxxx,ttttt,wwwww,xxxxxK2,

working successfully.
 
Last edited:
nothing happens?
9B4B3DDE-DC8E-4780-B82E-DD97E6414073.jpeg
 
Why can't you use "edit > line operations > remove duplicate lines"?
 
test.JPG


this is what i get if i use the method above
 
Back
Top