10-08-2017, 05:21 PM
I have a text file. Let's say it's:
It isn't, but let's say it is.
What I want is a text file that reads:
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.
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.
Getting me free admission into gaming conventions for a decade