I upload files all at once so its like 10 stuffs at a time. & 3 different file hosts. I am trying to do is sort this links based on the name of the stuff

Example: I have this links

INPUT
http://RS.com/file1.part01.rar
http://RS.com/file1.part02.rar
http://RS.com/file2.part01.rar
http://RS.com/file2.part02.rar
http://FS.com/file1.part01.rar
http://FS.com/file1.part02.rar
http://FS.com/file2.part01.rar
http://FS.com/file2.part02.rar
http://HF.com/file1.part01.rar
http://HF.com/file1.part02.rar
http://HF.com/file2.part01.rar
http://HF.com/file2.part02.rar

I want this as to be arranged based on the stuff name i.e. file1, file2. The ouput should be like
output
http://RS.com/file1.part01.rar
http://RS.com/file1.part02.rar
http://FS.com/file1.part01.rar
http://FS.com/file1.part02.rar
http://HF.com/file1.part01.rar
http://HF.com/file1.part02.rar

http://RS.com/file2.part01.rar
http://RS.com/file2.part02.rar
http://FS.com/file2.part01.rar
http://FS.com/file2.part02.rar
http://HF.com/file2.part01.rar
http://HF.com/file2.part02.rar

Do u guys have any idea to make this work. I am trying this for some time now. But I failed miserably

Note : Please I dont want to sort the links. Sorting is easy & I already have sorted list. I need output in particular format as seen in example. Links of one stuff with diffFilehost at a time. Its not as u guys are thinking.
CJ Reviewed by CJ on . Links Sorter I upload files all at once so its like 10 stuffs at a time. & 3 different file hosts. I am trying to do is sort this links based on the name of the stuff Example: I have this links INPUT http://RS.com/file1.part01.rar http://RS.com/file1.part02.rar http://RS.com/file2.part01.rar http://RS.com/file2.part02.rar http://FS.com/file1.part01.rar Rating: 5