To match roman numerals using Regex you can use the following regex.
The First Group should contain the Roman Numeral.
^(?i:(?=[MDCLXVI])((M{0,3})((C[DM])|(D?C{0,3}))?((X[LC])|(L?XX{0,2})|L)?((I[VX])|(V?(II{0,2}))|V)?))$
All the Code Snippets and Samples you need
To match roman numerals using Regex you can use the following regex.
The First Group should contain the Roman Numeral.
^(?i:(?=[MDCLXVI])((M{0,3})((C[DM])|(D?C{0,3}))?((X[LC])|(L?XX{0,2})|L)?((I[VX])|(V?(II{0,2}))|V)?))$
You must be logged in to post a comment.
RT @CodeSnippetsNET: How to match roman numerals using #Regex http://t.co/oLVLvpnQbd #programming #coding #code #developer #dev #programmer…
RT @CodeSnippetsNET: How to match roman numerals using #Regex http://t.co/oLVLvpnQbd #programming #coding #code #developer #dev #programmer…
RT @CodeSnippetsNET: How to match roman numerals using #Regex http://t.co/oLVLvpnQbd #programming #coding #code #developer #dev #programmer…
RT @CodeSnippetsNET: How to match roman numerals using #Regex http://t.co/oLVLvpnQbd #programming #coding #code #developer #dev #programmer…