emilford has asked for the wisdom of the Perl Monks concerning the following question:
Okay, so I'm anal about the way my music files are named on my hard drive. I like to have my music files named in a specific format, so after downloading a ton of music, I have a lot of renaming to do.
I thought to myself, why not once again use perl to your advantage. Here's what I'm looking for: I download files with all sorts of naming conventions and I'm looking to rename them to this format:
What regular expression would I need (or series of regular expressions) to rename a file like below? Or is this too broad of a task, with too many possibilities to do with reg. exps.?
I thought to myself, why not once again use perl to your advantage. Here's what I'm looking for: I download files with all sorts of naming conventions and I'm looking to rename them to this format:
I started thinking of a regular expression that could do this and then realized all the possible cases to take of. Capitalization, removing certain elements, adding spaces where needbe, etc. I'm not the most experienced programmer when it comes to regular expressions, but from my minimal use, I think this could be done. Any help monks?Music Author - Song of Title
What regular expression would I need (or series of regular expressions) to rename a file like below? Or is this too broad of a task, with too many possibilities to do with reg. exps.?
xecutioners-you_cant_scratch_(skit) to Xecutioners - You Cant Scratch Skit
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: a task for a regular expression expert
by stephen (Priest) on Apr 13, 2002 at 17:23 UTC | |
by emilford (Friar) on Apr 13, 2002 at 17:39 UTC | |
Re: a task for a regular expression expert
by perlplexer (Hermit) on Apr 13, 2002 at 18:38 UTC | |
by emilford (Friar) on Apr 13, 2002 at 18:55 UTC | |
by Anonymous Monk on Apr 14, 2002 at 01:55 UTC | |
Making consistent file names for MP3s (boo)
by boo_radley (Parson) on Apr 13, 2002 at 19:02 UTC | |
Re: a task for a regular expression expert
by Juerd (Abbot) on Apr 13, 2002 at 17:10 UTC | |
Re: a task for a regular expression expert
by emilford (Friar) on Apr 13, 2002 at 17:24 UTC |
Back to
Seekers of Perl Wisdom