How to remove leading characters from user defined multi tag

W

wilte01

Guest
I have two scripts that between them collect the track genres and combine them into an album genre, which is ultimately written to each track of the release.

The first script accumulates each of the track genres into an album genre field :

‘’‘‘taggerscript
$set_a(_albumgenre,$get_a(_albumgenre); %titlegenre%)
‘’’’
The second script takes the value accumulated and writes it to an album genre tag:

‘’‘‘taggerscript
$set(albumgenre,$get_a(_albumgenre))
$set(albumgenre,$unique($sortmulti(%albumgenre%)))
‘’’’
The scripts are run manually because they reference user-defined tags rather than using MusicBrainz available tags.

Everything works fine, apart from one small problem, i.e. the resulting value in the ‘albumgenre’ tag ends up looking as follows:

; Doo-Wop; Glam Rock; Pop Rock; Progressive Pop

Note the leading '; ’ in the above

I’m pretty sure that removing the leading characters could be done via $replace or $rreplace but my regex is non-existent, so not sure how I would code it.

If anybody has any ideas or can offer an alternative approach, I’d be grateful for the advice

1 post - 1 participant

Read full topic

Continue reading...
 
Top