Roman numerals in uppercase
This "Regular Expression" changes Roman numerals in uppercase.
Valid range of numbers: "I" to "MMMCMXCIX" (decimal: 1-3999).
Dieser "Reguläre Ausdruck" ändert römische Ziffern in Großbuchstaben.
Gültiger Zahlenbereich: "I" bis "MMMCMXCIX" (dezimal: 1-3999).
Example
From:
"ab i ab ii ab iii iv v vv vi vii viii ix abc x mcmliv ll cmm mmix-ix-xi"
To:
"ab I ab II ab III IV V vv VI VII VIII IX abc X MCMLIV ll cmm MMIX-IX-XI"
$regexp(%TITLE%,'\b(?i:(?=[MDCLXVI])((M{0,3})((C[DM])|(D?C{0,3}))?((X[LC])|(L?X{0,3})|L)?((I[VX])|(V?(I{0,3}))|V)?))\b','\U$0')
Alternative:
(using the 'ignore case' parameter of the Mp3tag $regexp function instead of regex modifier)
$regexp(%TITLE%,'\b(?=[MDCLXVI])((M{0,3})((C[DM])|(D?C{0,3}))?((X[LC])|(L?X{0,3})|L)?((I[VX])|(V?(I{0,3}))|V)?)\b','\U$0',1)
Attached is a Mp3tag mte export script, which visualizes the results of three attempts using regular epressions, which are able to upcase Roman Numerals in different quality.
Test.RomanNum.Upcase.zip (1.95 KB)
DD.20100831.1133.CEST
Edit. Spelling error in RegEx corrected and zip file attached.
DD.20110320.1518.CET
Test.RomanNum.Upcase.zip (1.95 KB)