You can find here a full roman numeral regular expression for FileBot script fn:amc.
Code: Select all
{n.replaceAll(/\b(?i:M{1,4}(?:CM|CD|D?C{0,3})(?:XC|XL|L?X{0,3})(?:IX|IV|V?I{0,3})|M{0,4}(?:CM|C?D|D?C{1,3})(?:XC|XL|L?X{0,3})(?:IX|IV|V?I{0,3})|M{0,4}(?:CM|CD|D?C{0,3})(?:XC|X?L|L?X{1,3})(?:IX|IV|V?I{0,3})|M{0,4}(?:CM|CD|D?C{0,3})(?:XC|XL|L?X{0,3})(?:IX|I?V|V?I{1,3}))\b/, { it.upper() })}
I've just adapted for fn:amc scripting after testing it on http://www.regexplanet.com/advanced/java/index.html
Note : FileBot fn:amc replaceAll works correctly only if all capture group are ignore by (?:) or including a modifier as ingorecase (?i:)