Question

this is what i mean

i want this

200.22.30.17 : 186 : 186
200.22.30.17 : 1860 : 1860
200.22.30.17 : 1984 : 1984
81.22.148.39 : 1612 : 1612
81.22.148.39 : 1736 : 1736
81.22.148.39 : 1798 : 1798
81.22.148.39 : 186 : 186
81.22.148.39 : 1860 : 1860
81.22.148.39 : 1984 : 1984
20.47.240.254 : 2542 : 2542
20.47.240.254 : 2604 : 2604

to be like this

200.22.30.17 : 186 : 186
81.22.148.39 : 1612 : 1612
20.47.240.254 : 2542 : 2542

any help please !!

Was it helpful?

Solution

I'm not familiar with Notepad++, but if it supports back-references then this ought to work:

Replace ^(\d+\.\d+\.\d+\.\d+ )(.+)\n(\1.+\n)* with \1\2\n

Note: Depending on how the line breaks are stored in your source file, you might have to change each occurrence of \n to \r or \r\n

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top