in reply to Pattern Matching

to line things up

^\({0,1} ( ((ix)|(iv)) |(x{0,3}((ix)|(iv))) |(x{0,3}(v{0,1}i{0,3})) ){1,1}( (\)\. ) |(\)) |(\. ) |( ) ){1,1}

|(x{0,3}(v{0,1}i{0,3})) matches nothing (the zeros) 1 times

Had to look hard

Edit: see also http://stackoverflow.com/questions/267399/how-do-you-match-only-valid-roman-numerals-with-a-regular-expression

Replies are listed 'Best First'.
Re^2: Pattern Matching
by davidas (Initiate) on Mar 17, 2017 at 21:23 UTC

    duh... yes, of course it does. Thankyou for pointing out the nearly obvious