Regex matching punctuation and roman in lowercase [duplicate]
Possible Duplicate:
How do you match only valid roman numerals with a regular expression?
Hi,
How do I match r开发者_JAVA技巧egex to something like
[i])
[ii])
[iii])
[iv])
and so on...
Thanks
/^\[[ivmcldx]+\])/
should catch the most common roman numerals. It won't stumble on invalid numerals like iiix
, though.
精彩评论