Hi everyone-
I have %unsyncedlyrics% populated for my songs. They always begin in either one of the following formats:
(A)
eng||ComposerA: Abc/Def
LyricistA: Ghi/Jkl
ArrangerA: Mno/Pqr
ProducerA: Stu/Vwx(Lyrics blah blah blah)
Or, (B)
eng||ComposerB: Abc/Def
LyricistB: Ghi/Jkl
ArrangerB: Mno/Pqr
ProducerB: Stu/Vwx(Lyrics blah blah blah)
I want to feed this data into the fields: %composer%, %lyricist%, %arranger%, and %producer%.
Think of ComposerA and ComposerB as "composer" written in different languages, e.g. "Composer" for an English song, but "Compositeur" for a French song. (Idk, I'm just making stuff up - I don't think it'd matter much as it'll just be a search term.)
Below is as far as I got:
$mid(%unsyncedlyrics%,$add($strchr(%unsyncedlyrics%,Composer: ),10),$sub($strchr(%unsyncedlyrics%,Lyricist: ),$add($strchr(%unsyncedlyrics%,Composer: ),10)))
The "10" represents the length of "Composer: ", so it will return the text after "...ser: " and not "Com...".
This does not take into account the A OR B option. However, the issue I have now is that, it seems like the line spacing is giving me errors. When running this code, in the %composer% field, I see:
Abc/Def...
Or
Abc/Def
(blank line)
That is, the composer field is also capturing the line break, which I do not want. I tried trimming it by one character, but that doesn't work.
Could anyone please help. Much appreciated.




