# Arithmetic in Functions

**URL:** <https://community.mp3tag.de/t/arithmetic-in-functions/18389>\
**Category:** Support\
**Created:** [November 2, 2016, 7:43am UTC](https://community.mp3tag.de/t/arithmetic-in-functions/18389 "2016-11-02T07:43:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![macnab](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/ee7513/32.png) [@macnab](https://community.mp3tag.de/u/macnab)\
**Post date:** [November 2, 2016, 7:43am UTC](https://community.mp3tag.de/t/arithmetic-in-functions/18389/1 "2016-11-02T07:43:44Z")

</div>

In a tag I have artist - title. I want to extract title. Using len - strstr in the function doesn't work, the arithmetic is ignored.  
How do I do this?

EDIT: Got it. Use sub()

---

<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:** [November 2, 2016, 8:15am UTC](https://community.mp3tag.de/t/arithmetic-in-functions/18389/2 "2016-11-02T08:15:50Z")

</div>

> [@macnab](#):
>
> In a tag I have artist - title. I want to extract title. Using len - strstr in the function doesn't work, the arithmetic is ignored.  
> How do I do this?

Well, it should. So please show us the expression and the data.

On the other hand: it may be easier to use an action of the type "Guess value" (import tag field) for %artist%  
Pattern: %artist% - %title%

---

<div class="post-metadata">

**Author:** ![macnab](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/ee7513/32.png) [@macnab](https://community.mp3tag.de/u/macnab)\
**Post date:** [November 2, 2016, 8:17am UTC](https://community.mp3tag.de/t/arithmetic-in-functions/18389/3 "2016-11-02T08:17:44Z")

</div>

> [@ohrenkino](#):
>
> Well, it should. So please show us the expression and the data.
> 
> On the other hand: it may be easier to use an action of the type "Guess value" (import tag field) for %artist%  
> Pattern: %artist% - %title%

I got it - use $sub(x,y)

---

<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:26pm UTC](https://community.mp3tag.de/t/arithmetic-in-functions/18389/4 "2026-02-09T12:26:30Z")

</div>


