July 12th, 2012, 02:35 PM
Join Date: Jul 2012
Time spent in forums: 17 m
Reputation Power: 0
Edit a text file -- Please help!
I have a very large text file on my desktop, with about 2500 lines.
Each line is quite short, each containing either a song file or movie file, here's a sample list of them:
Signs 2002 TLKDA9ALKADNCLA0
I need a code that will identify 4 numbers in a row (a date) and remove all characters after that.
I want the red text to be removed... This must be repeated for each line (a loop?)
The second function I need done is to replace underscores "_" with a space, and also I'd like to replace periods "." with a space.
I would like the altered text file to then be written back to my desktop.
So ultimately, the 3 file names above should end up like this in a new text file:
Snabba Cash 2010
I'm using TextPad, but have NO idea what type of code to use... or what it should look like. I was only told to use "Regular Expressions"...
Please help, thanks a lot!!