Hi people.
I'm working on a way to address common issues with renaming artists and songs with "The" as the first word.
I realise some people do not like Artist, The but I will campaign for this nomenclature as when you have Artist = Eagles and Artist = Eagles, The it is easier to see in your "sorted by artist" list.
So far i've come up with a method of renaming some of the TITLES. eg.
Artist - The Song Title (Some Text) ... becomes
Artist - Song Title, The (Some Text)
This is part way there as my made up "rules" for artist and title total about four.
I'm also having an issue with regex being greedy, so i moved to format value.
Can I incorporate / mix regex and format value?
The ideal outcomes / rules are:
- The Artist ==> Artist, The
- The Artist word word word ==> Artist word word word (drops "The")
- The Artist feat. Artist Two ==> Artist, The feat. Artist Two
- Artist One feat. The Artist ==> Artist One feat. Artist, The
Title is the same as rules 1 and 2 for Artist SO
The word word word (text in brackets) ==> word word word (text in brackets)
BUT
The word (text in brackets) ==> Word, The (text in brackets) *1
*1 I have done this successfully with regex. However, it fails when the Title is:
The word (text) (in) (brackets) as i'm using a greedy operator.
So that's when I switched to Format Value.
It would be great if I could count the number of spaces before a ( so i can use the $if function.
I'll keep working on it but any tips on how to count spaces before a bracket would help lots. Cheers