Replace action with multiple genre entries


#1

Newbie help please, :smiley:

I have multiple genre entries each separated by \\

I wish to for example change \\rock\\ with \\pop - rock\\

I have tried creating a replace action, replacing 'rock' with 'pop - rock' BUT this also changes other genre tags containing the word 'rock' such as \\hard rock\\

I'm sure I'm missing something obvious, any help appreciated

Regards 'helpless'


#2

it's not so obvious.
\\rock\\ to \\pop - rock\\ does not work because \\ is not interpretated as a character as far as iunderstand this.

It works with replace with regular expressions, there you can indicate the start and the end of a field.
Field: GENRE
Regular Expression: ^rock$
Replace Matches With: pop rock


#3

You want to change the content of a multi-value tag-field, so you have to know how to apply the $meta... functions.

Action: Format value Feld: GENRE Formatstring: $trim($replace('\\\\'$meta_sep(GENRE,'\\\\')'\\\\','\\\\Rock\\\\','\\\\Pop Rock\\\\'),'\') From: 'Hard Rock\\\\Rock\\\\Soft Rock' To: 'Hard Rock\\\\Pop Rock\\\\Soft Rock'

DD.20110119.0043.CET


#4

Wonderful, that worked a treat, thanks both for your time. Looks like I have lots to learn

Regards :slight_smile: