Exercise: Match Roman numbers

I usually give this as a bonus exercise for people who finish all the other exercises early. Let's see if you can do this?

Write a function that return "true" if the given value is a Roman number. Can you even write a Roman to "normal" (also known as Arabic) number converter?

Roman numbers are:

I    = 1
II   = 2
III  = 3
IV   = 4
V    = 5
VI   = 6
VII  = 7
VIII = 8
IX   = 9
X    = 10
...

I     = 1
V     = 5
X     = 10
L     = 50
C     = 100
D     = 500
M     = 1000

Tools

Solution