Perl Regex Output only characters that can be used as unix filename
- by Jeff Balinsky
I wrote a basic mp3 organizing script for myself.
I know the power of regex but I suck with the syntax
I have the line $outname = "/home/jebsky/safehouse/music/mp3/" . $inital . "/" . $artist . "/" . $year ." - ". $album . "/" . $track ." - ". $artist ." - ". $title . ".mp3";
All I want is a regex to change $outname so that any non safe for filename characters get replaced by an underscore
Thanks
Jeff