# Different Rating tags

**URL:** https://community.mp3tag.de/t/different-rating-tags/9413
**Category:** Support
**Created:** [November 24, 2009, 10:02pm UTC](https://community.mp3tag.de/t/different-rating-tags/9413 "2009-11-24T22:02:13Z")
**Posts on this page:** 1
**Showing post:** 8

<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: [November 27, 2009, 2:53am UTC](https://community.mp3tag.de/t/different-rating-tags/9413/8 "2009-11-27T02:53:14Z")

</div>

> [@DJ ektorBarajas](#):
>
> Thanks DetlevD for the regexp, but I'm having issues setting it up.  
> Also I forgot to mention another value of the POPULARIMETER tag, so here is the full list of the possible popularimeter values and the equivalence in RATING WMP (which is the same with RATING MM):  
> traktor@native-instruments.de|0|0 RATING WMP=0  
> traktor@native-instruments.de|51|0 RATING WMP=1  
> traktor@native-instruments.de|102|0 RATING WMP=2  
> traktor@native-instruments.de|153|0 RATING WMP=4  
> traktor@native-instruments.de|204|0 RATING WMP=4  
> traktor@native-instruments.de|255|0 RATING WMP=5  
> ...

This should work ...

```
$if($eql($regexp(%POPULARIMETER%,'^.+\|(\d{3})\|.+$','$1'),255),5,
$if($eql($regexp(%POPULARIMETER%,'^.+\|(\d{3})\|.+$','$1'),204),4,
$if($eql($regexp(%POPULARIMETER%,'^.+\|(\d{3})\|.+$','$1'),153),3,
$if($eql($regexp(%POPULARIMETER%,'^.+\|(\d{3})\|.+$','$1'),102),2,
$if($eql($regexp(%POPULARIMETER%,'^.+\|(\d{2})\|.+$','$1'),51),1,0)))))

```

... or this ...

```
$if($eql($regexp(%POPULARIMETER%,'^.+\|(\d{3})\|.+$','$1'),255),5,
$if($eql($regexp(%POPULARIMETER%,'^.+\|(\d{3})\|.+$','$1'),204),4,
$if($eql($regexp(%POPULARIMETER%,'^.+\|(\d{3})\|.+$','$1'),153),3,
$if($eql($regexp(%POPULARIMETER%,'^.+\|(\d{3})\|.+$','$1'),102),2,
$if($eql($regexp(%POPULARIMETER%,'^.+\|(\d{2})\|.+$','$1'),51),1,
$if($eql($regexp(%POPULARIMETER%,'^.+\|(\d{1})\|.+$','$1'),0),0,))))))

```

To avoid multiple usage of function regexp you may use ...

Begin Actionsgroup **POPULARIMETER to RATING WMP**

Action #1  
_Actiontype 5:_ **Format tag field**  
_Field:_ **RATING÷WMP**  
_Formatstring:_ **$regexp(%POPULARIMETER%,'^.+|(\d{1,3})|.+$','$1')**

Action #2  
_Actiontype 5:_ **Format tag field**  
_Field:_ **RATING÷WMP**  
_Formatstring:_ **$if($eql(%RATING÷WMP%,255),5,$if($eql(%RATING÷WMP%,204),4,$if($eql(%RATING÷WMP%,153),3,$if($eql(%RATING÷WMP%,102),2,$if($eql(%RATING÷WMP%,51),1,$if($eql(%RATING÷WMP%,0),0,))))))**

_Note: Replace each special ÷ character with one space character._  
End Actionsgroup **POPULARIMETER to RATING WMP** (2 Actions)

There might be another simple solution ...

Begin Actionsgroup **POPULARIMETER to RATING WMP**

Action #1  
_Actiontype 5:_ **Format tag field**  
_Field:_ **RATING÷WMP**  
_Formatstring:_ **$div($regexp(%POPULARIMETER%,'^.+|(\d{1,3})|.+$','$1'),51)**

_Note: Replace each special ÷ character with one space character._  
End Actionsgroup **POPULARIMETER to RATING WMP** (1 Action)

DD.20091127.0500.CET

---

_[View the full topic](https://community.mp3tag.de/t/different-rating-tags/9413)._
