Furiously Eclectic People
It's late, I'm tired. Do my job for me. - Printable Version

+- Furiously Eclectic People (http://furiouslyeclectic.com/forum)
+-- Forum: Toying with Sardonicism (http://furiouslyeclectic.com/forum/forumdisplay.php?fid=4)
+--- Forum: Endless Blanket (http://furiouslyeclectic.com/forum/forumdisplay.php?fid=5)
+--- Thread: It's late, I'm tired. Do my job for me. (/showthread.php?tid=402)



It's late, I'm tired. Do my job for me. - Oedipussy Rex - 10-08-2017

I have a text file. Let's say it's:

Code:
Amazing Spider-Man 01

Amazing Spider-Man 02
Amazing Spider-Man 03
Amazing Spider-Man 04
Amazing Spider-Man 05
Amazing Spider-Man 07
Amazing Spider-Man 09
Batman 01
Batman 02
Batman 03
Batman 05
Batman 06
Batman 07
Batman 08
Batman 09
Batman 10
Batman 11

It isn't, but let's say it is.

What I want is a text fileĀ that reads:

Code:
Amazing Spider-Man 01-05, 07, 09
Batman 01-03, 05-11

LeadingĀ 0s are optional, but exist in the original file. Also, spaces after commas aren't strictly necessary.

I want to do this on a file over 10,000 lines long, so doing it by hand is out of the question.


RE: It's late, I'm tired. Do my job for me. - Kersus - 03-31-2018

Did you find a solution?

https://www.stashmycomics.com