• + 0 comments

    Interesting problem, and I learned a fine point or two about Roman numerals. :)

    My solution is a little different in that I didn't use any | alternatives:

    regex_pattern = r"^M{0,3}(CM)?(C?D)?C{0,3}(XC)?(X?L)?X{0,3}(IX)?(I?V)?I{0,3}$"