Parsing a field...

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Parsing a field...

Re: Parsing a field...

by Lowlander » Tue Aug 13, 2013 10:10 pm

No, it can just display fields as they're tagged.

Re: Parsing a field...

by TWKArtist » Tue Aug 13, 2013 5:01 pm

@Lowlander -- Thanks, and again I already use the RegExp add-on -- it is great..!

But it cannot help me set the mask in the Options > Playback Rules section for "Summary Rules for individual files...".
As far as I can tell, that is governed by the code syntax that is built-in to mediamonkey and I cannot parse fields like I could using the Reg Exp tool.

>>TimK

Re: Parsing a field...

by Lowlander » Mon Aug 12, 2013 6:02 pm

You can pull any information if there is a delimiter. It will get tricky with space as delimiter. You may want to check out: http://www.mediamonkey.com/forum/viewto ... lit=regexp

Re: Parsing a field...

by TWKArtist » Mon Aug 12, 2013 5:43 pm

@Lowlander -- Yes, it does -- if I wanted the entire name of the Artist. I want to pull out only the last name from the data that is stored in the field.

Re: Parsing a field...

by Lowlander » Sun Aug 11, 2013 10:13 pm

<Artist>, does the trick.

Parsing a field...

by TWKArtist » Fri Aug 09, 2013 4:03 pm

In 'Configuring Directory and Filename Formats' there is no listing for any type of function that will help me to parse out part of a field.

For example, if in my <Artist> field for classical music I have the name: "Copland, Aaron"
what I want to do is to extract the name "Copland" by itself. I can achieve pulling out the name if I use the $Left function hard coded with a number like this: $Left(<Artist>,7) which, of course will give me the desired "Copland."

But to code it flexibly for all instances I need to replace the number (in this case '7') with a formula to parse all characters left of the comma delimiter.

In normal VB script syntax I could use a combination of functions like this:
$Left(<Artist>, $InStr(<Artist>, ",")-1)
which would calculate the position of the comma delimiter (in this case position 8) then subtract one character to leave 7 and then use that number 7 as the argument for the $Left() function -- resulting in the desired return of 'Copland.'

Similarly, if the <Artist> field read "Igor Stravinsky" I can find no way to automatically select the last name (i.e. everything right of the space) either.

Any suggestions on what method I could employ instead of this..?
Or, if not, I would think that adding such functionality to the code base for MediaMonkey would be very desirable.

Top