6 votes

RegEx Roman Numerals

1 comment

  1. cfabbro
    (edited )
    Link
    The solution from Stack Overflow he shows at the end, for those curious: ^(?=[MDCLXVI])M*(C[MD]|D?C{0,3})(X[CL]|L?X{0,3})(I[XV]|V?I{0,3})$ Which appears to be taken from here:...

    The solution from Stack Overflow he shows at the end, for those curious:

    ^(?=[MDCLXVI])M*(C[MD]|D?C{0,3})(X[CL]|L?X{0,3})(I[XV]|V?I{0,3})$
    

    Which appears to be taken from here:
    https://stackoverflow.com/a/36576402

    1 vote