Extract Part of Album Artist Tag

Need: Extract first two characters of Album Artist which are numbers and put them in the Discnumber Tag.

Example of current "Album Artist" tag: 15 Science and technology
Example of what "Discnumber" tag should look like for this file: 15/18

Since I have very limited understanding of Scripting, anyone who can help me should please provide an answer I can just copy and paste into hopefully the Convert Tag - Tag function. When I look at other resources in FAQ and the forum, the more general scripting methodology outlined just goes over my head.


Where does the "18" in 15/18 come from? Are you sure it is DISCNUMBER and not TRACK?

If you want to use Convert>Tag-Tag
use it with these instructions:

  1. Field: DISCNUMBER
    Format string: $left(%albumartist%,2)

    Format string: $regexp(%albumartist%,^\d+ ,)

Thank you so much!

The 18 is the number of discs and i am manually entering that. So I ended up using $left(%albumartist%,2)/18 in discnumber for a Convert Tag - Tag operation which worked perfectly for what I needed. I don't understand the format string you put for Album Artist but did not need that to accomplish my needs.

Again - thank you very much for the help.

If you enter that expression in the Tag-Tag-converter, you should see the result.
The ALBUMARTIST treatment was intended to remove the leading number from the ALBUMARTIST as you now have stored that data in the field DISCNUMBER and you do not need that redundancy.