\bM{0,4}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})\b
https://www.regexplanet.com/share/index.html?share=3ubb