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