# Extract Part of Album Artist Tag

**URL:** https://community.mp3tag.de/t/extract-part-of-album-artist-tag/18493
**Category:** General Discussion
**Created:** [December 7, 2016, 6:31pm UTC](https://community.mp3tag.de/t/extract-part-of-album-artist-tag/18493 "2016-12-07T18:31:42Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![miso](https://community.mp3tag.de/user_avatar/community.mp3tag.de/miso/32/416_2.png) [@miso](https://community.mp3tag.de/u/miso)
#### Post date: [December 7, 2016, 6:31pm UTC](https://community.mp3tag.de/t/extract-part-of-album-artist-tag/18493/1 "2016-12-07T18:31:42Z")

</div>

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.

Thanks!

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [December 7, 2016, 8:22pm UTC](https://community.mp3tag.de/t/extract-part-of-album-artist-tag/18493/2 "2016-12-07T20:22:49Z")

</div>

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)

2. Field ALBUMARTIST  
Format string: $regexp(%albumartist%,^\d+ ,)

---

<div class="post-metadata">

### Author: ![miso](https://community.mp3tag.de/user_avatar/community.mp3tag.de/miso/32/416_2.png) [@miso](https://community.mp3tag.de/u/miso)
#### Post date: [December 7, 2016, 9:06pm UTC](https://community.mp3tag.de/t/extract-part-of-album-artist-tag/18493/3 "2016-12-07T21:06:09Z")

</div>

> [@ohrenkino](#):
>
> 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)
> 
> 2. Field ALBUMARTIST  
> 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.

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [December 8, 2016, 5:11am UTC](https://community.mp3tag.de/t/extract-part-of-album-artist-tag/18493/4 "2016-12-08T05:11:23Z")

</div>

> [@miso](#):
>
> 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.
