# Function Evaluation

**URL:** <https://community.mp3tag.de/t/function-evaluation/15203>\
**Category:** Support\
**Created:** [November 14, 2013, 8:34pm UTC](https://community.mp3tag.de/t/function-evaluation/15203 "2013-11-14T20:34:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mheitm](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/dec6dc/32.png) [@mheitm](https://community.mp3tag.de/u/mheitm)\
**Post date:** [November 14, 2013, 8:34pm UTC](https://community.mp3tag.de/t/function-evaluation/15203/1 "2013-11-14T20:34:16Z")

</div>

I have some cluttered up tags and would like to, for example, separate out the conductor so that  
the tag to tag operation moves the part of  
Album Artist, "Rafael Kubelik, Berliner Philharmoniker"  
that comes before the comma to 'Conductor'

That should be possible with  
$mid(%albumartist%,1,$strchr(%albumartist%,',')-1)  
because $strchr(%albumartist%,',') equals to 15 and I only want the first 14 characters.

The problem is that the '-1' is ignored. How can I tell MP3TAG that I want it to use the result of a calculation, 15-1, used in %mid?

Thanks!  
M.

---

<div class="post-metadata">

**Author:** ![dano](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dano/32/6_2.png) [@dano](https://community.mp3tag.de/u/dano)\
**Post date:** [November 14, 2013, 9:01pm UTC](https://community.mp3tag.de/t/function-evaluation/15203/2 "2013-11-14T21:01:47Z")

</div>

Use the $sub() function.

---

<div class="post-metadata">

**Author:** ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)\
**Post date:** [February 9, 2026, 12:24pm UTC](https://community.mp3tag.de/t/function-evaluation/15203/3 "2026-02-09T12:24:45Z")

</div>

Closed on February 9, 2026, 12:24pm UTC


