I have three potential scenarios. A String could either represent an artist, an album or a song. Unfortunately each string is going to be preceded by a path. Here is an example of each of the scenarios.
/Volumes/WD/Not Migrating/Music/Ana Tijoux (An Artist)
/Volumes/WD/Not Migrating/Music/Eminem/Ana Tijoux/Luchin (An Album)
/Volumes/WD/Not Migrating/Music/Eminem/Ana Tijoux/Luchin/Luchin.m4a (A Song)
I the most efficient regular expression to trim "/Volumes/WD/Not Migrating/Music/" from my original string. Once this is complete, this will be assigned to a variable. I then need a regular expression to determine the number of "/". This will help me determine if the that variable contains an Artist (0 "/"), an Album (1 "/") , A song (2 "/")
Lastly, is there a way to print bullet points in Perl? Depending on the number of "/" is how many indents i will print the variable with.
In reply to Most efficient way to remove some text from a string by adamZ88
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |