N
N
Nikita2019-07-17 06:46:40
cmd/bat
Nikita, 2019-07-17 06:46:40

How to search and save duplicate strings?

For example, there is a base with N number of rows, say 100k. The lines look like this:
[email protected]:123
[email protected]:1234
[email protected]:2dw123ds

[email protected] :1232dw equally. After the character ":" any number/letter can be placed.
Task:
Somehow analyze the loaded database and after processing save those lines in which there is a repetition up to the ":" character. Roughly speaking - save the lines: [email protected]:123 and [email protected]:1234
It is necessary to do this with a batch file, possibly through a regular expression.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dimonchik, 2019-07-17
@dimonchik2013

what is difficult?
divide by the ':' symbol into two additional columns, group by , count by the first of the additional ones - where more than 1, save
delete the auxiliary data

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question