I am stuck between a problem where only one regex pass is allowed (some kind of old hard code). I need a regex for Roman numerals.
I tried standard ie ^(?i)M*(D?C{0,3}|C[DM])(L?X{0,3}|X[LC])(V?I{0,3}|I[VX])$, but the problem is that it also allows null ( '') values .
Is there any way to check the problem?
source
share