Hi, @kaveh-202 @alan-kilborn and All,
Let suppose, to begin with, to focus on the first 10 chars, after the string /film/
Then, from your example :
http://dl3/film/Daylights.End.3******************* http://dl4/film/The.Phenom.2016******************* http://dl45/film/The.Wild.Life.720*************** http://dl58/film/Pele.Birth.Of.A******************* http://dl4/film/Sultan.2016.720******************* http://dl3pw/film/The.Guvnor.2016******************* http://dl3.pw/film/The.Wild.Life.2******************* http://dl3.f/film/An.Almost.Perfe******************* http://dl3.ftk.pw/film/Scooby.Doo.And.******************* http://d2/film/A.Conspiracy.Of******************* http://dl45/film/Daylights.End.2*******************With the simple regex S/R, below :
SEARCH (?-s)^.+/film/(.{10})
REPLACE \1\t$0
We get the text :
Daylights. http://dl3/film/Daylights.End.3******************* The.Phenom http://dl4/film/The.Phenom.2016******************* The.Wild.L http://dl45/film/The.Wild.Life.720*************** Pele.Birth http://dl58/film/Pele.Birth.Of.A******************* Sultan.201 http://dl4/film/Sultan.2016.720******************* The.Guvnor http://dl3pw/film/The.Guvnor.2016******************* The.Wild.L http://dl3.pw/film/The.Wild.Life.2******************* An.Almost. http://dl3.f/film/An.Almost.Perfe******************* Scooby.Doo http://dl3.ftk.pw/film/Scooby.Doo.And.******************* A.Conspira http://d2/film/A.Conspiracy.Of******************* Daylights. http://dl45/film/Daylights.End.2*******************Then, it’s obvious that the first and last line are duplicates ( Daylights. ) , as well as lines 3 and 5 ( The.Wild.L )
Now, what do you want to do regarding lines 1 and 11 and lines 3 and 5 ?
Presently, it’s quite easy to build a regex which would delete all duplicates lines, keeping only the last one found !
Two other questions :
Do you mind if a sort process is used, which, of course, would alter the initial order of lines ?
How many duplicates lines may have a line ? Only 1 duplicate or more ?
BR
guy038