A regex I use to format titles, especially for audio files with a CUE sheet, where it is not possible to specify <Movement#> and <MovementName> for each track.
Possible title content expected in input:
Title format | Title content | Resulting display |
Text | Protector of the Common Folk | Protector of the Common Folk |
#. Text or #letter. Text or P#letter. Text
| 1. Adagio 12c. Chinese dance P3.12. Seid froh dieweil
| 1. Adagio 12c. Chinese dance P3.12. Seid froh dieweil
|
(Text) Text | (Encore) Wien, Wien, nur Du allein | (Encore) Wien, Wien, nur Du allein |
Number+letter. (Text) Text | 4b. (Choir) O Freunde, nicht diese Töne!
| 4b. (Choir) O Freunde, nicht diese Töne! |
{font: Ubuntu;Italic;12}{color: 0,105,155}$RxReplace(<Title>,"^(P?[0-9.]+[a-z]*[.] )?([(][^)]*[)])?(.*)","$1"){color: 20,125,20}$RxReplace(<Title>,"^(P?[0-9.]+[a-z]*[.] )?([(][^)]*[)])?(.*)","$2"){font: default}{color: default}$RxReplace(<Title>,"^(P?[0-9.]+[a-z]*[.] )?([(][^)]*[)])?(.*)","$3")
$RxReplace is called three times, because it is not possible to insert the formatting codes directly into the replacement string.
Adapt to your taste and MB skin:
-
{font: Ubuntu;Italic;12} and
{font: default}-
{color: r,g,b} and
{color: default}