Open hsmit opened 10 years ago
in source: regular_expressions/n_m_syntax.html
I think you're right, if we want to write 4000 in roman numeral we use a vertical bar with just IV below to say " 4 * 1000 " There is also a problem when they tried to convert 3888, they have used 4 recurrences of M but it should just have 3
This example (7.8) (and just before it in 7.7) the code contradicts the initial rules for Roman numbers. The rules state that "The tens characters (I, X, C, and M) can be repeated up to three times". However, in the regex of 7.7 it states 4 optional M's; "pattern = '^M?M?M?M?(CM|CD|D?C?C?C?)(XC|XL|L?X?X?X?)$'" Later on this is continued by M{0,4} which is wrong, right?