Help Left Function

Hello,

I am writing several info into the Comment field.
Basically I have the key, then rating, the other info..
I would like to extract the key and the rating from the comment field to 2 additional fields called: KEY2 and Rating
I tried to use the left() function..but it does not work..
I did some search on the forum..and did not found what to fill in for the value , the field...

Any one could help me ?

thanks

fracta

See e.g. the help on string functions:
http://help.mp3tag.de/main_scripting.html#string
$left(x,n) returns the leftmost n characters of string x.

So, to get the first 7 characters from the left of a string (e.g. "Rolling Stones") use
$left("Rolling Stones",7)
and get "Rolling".
Instead of a string constant you can also use string variables like %artist%:
$left(%artist%,7)
or in your case
$left(%comment%,5).
But if you show us the real, typical data, it could be that $left() is not the best function for your problem.

great thanks a lot for your quick answer.

my comment field is like this

5A - 5 - Top - Tubes - Intro
or
12B - 3

I would like to extract the comment field into 3 or 4 fields

Field 1 would contain the key 2/3 digits
Field 2 would contain the iTunes rating
Field 3 would contain the rest

in the comment field, All data are separated by a "-"

thanks a lot for your help

You could try an action of the type "Guess value"
Source: %comment%
Pattern: %initialkey% -%popularimeter% - %field3%

and for

use also "Guess value"
Source: %comment%
Pattern: %initialkey% -%popularimeter%

ok I did not know this function...

my concern is that I should use the same formula...so will use the first 1 and my field 3 will be empty some times...

will give a try a let you know

thanks again

i give a try...it works for the classic field "mood"..but not for the new field I have added...
i have created a field Key2. and Rate...to collect the key and the rating..

here the action I did: %key2% - %rate% - %mood%

result: Im able to extract the mood value: top - end
but not the key and rate

thanks for your help

ok i made some progress... now I have the output..but only if the field3 is in comment

If comment = 5A - 5 - Top
this is working properly %key2% - %rate% - %mood%

but if comment = 5A - 4
I get nothing in output....

any idea ?

thanks

Yes, that is a different pattern - there is nothing to fill %mood%. So you may only use