开发者

Regex matching punctuation and roman in lowercase [duplicate]

This question already has answers here: Closed 11 years ago.

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜