# Conditional Guess

**URL:** https://community.mp3tag.de/t/conditional-guess/11418
**Category:** Support
**Created:** [January 10, 2011, 9:21am UTC](https://community.mp3tag.de/t/conditional-guess/11418 "2011-01-10T09:21:42Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![vkostas](https://community.mp3tag.de/user_avatar/community.mp3tag.de/vkostas/32/227_2.png) [@vkostas](https://community.mp3tag.de/u/vkostas)
#### Post date: [January 10, 2011, 9:21am UTC](https://community.mp3tag.de/t/conditional-guess/11418/1 "2011-01-10T09:21:42Z")

</div>

I want to achieve a conditional guess.

source tag %album% needs to be interpreted as 2 tags %album% (%setsubtitle%). I.e. Deep Purple In Rock (Anniversary Edition) would be split in Deep Purple in Rock and Anniversary Edition. Executing 2nd time the script shouldn't do a new split otherwise the 2nd tag will be overwritten.

I tried

```
$if(%setsubtitle%,%%album%% (%%setsubtitle%%),%%dummy%%)

```

but it didn't work.

Maybe what I want could be done using temporary tags but I have the feeling conditional guess is feasible. Probably I don't use the correct syntax.

Thank you.

---

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [January 10, 2011, 10:05am UTC](https://community.mp3tag.de/t/conditional-guess/11418/2 "2011-01-10T10:05:51Z")

</div>

> [@Victor Kostas](#):
>
> I want to achieve a conditional guess. ... I have the feeling conditional guess is feasible.

Feelings can be deceiving - but bad syntax is always right - it simply does not work.

A first help can be to set the Mp3tag Filter [F3] using this expression:

**"%ALBUM%" MATCHES "^.+? \(.+?\)$"**

This reduces the list of files to show only possible candidates.

You can use an action ...

Begin Action Group **Test 2011#20110110.VK** 

Action #1  
_Actiontype 7:_ **Import tag fields (guess values)**  
_Source format:_ **%ALBUM%**  
_Guessing pattern:_ **%ALBUM% (%SETSUBTITLE%)**

 

End Action Group **Test 2011#20110110.VK** (1 Action)

 

DD.20110110.1214.CET

 

You can use two actions "Format value" ...

  **SETSUBTITLE \<== $if(%SETSUBTITLE%,%SETSUBTITLE%,$regexp(%ALBUM%,'^(.+?)\s\((.+?)\)$','$2')) ALBUM \<== $regexp(%ALBUM%,'^(.+?)\s\((.+?)\)$','$1')** 

 

DD.20140910.1118.CEST

---

<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:22pm UTC](https://community.mp3tag.de/t/conditional-guess/11418/3 "2026-02-09T12:22:49Z")

</div>


