开发者

Regex matching punctuation and roman in lowercase [duplicate]

开发者 https://www.devze.com 2023-02-14 00:46 出处:网络
This question already has answers here: Closed 11 years ago. Possible Duplicate: How do you match only valid roman numerals with a regular expression?
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

精彩评论

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