所有我想要做的就是匹配2-16之间的数字,跨越1位至2位正则表达式 - 范围(2-16)?
根据http://www.regular-expressions.info/numericranges.html,他们有1米或2位数字的范围,但不是跨越both..if是例子说得通。
The regex [0-9] matches single-digit numbers 0 to 9. [1-9][0-9] matches double-digit numbers 10 to 99.
类似于“^ [2-9] [1-6] $”匹配21甚至96 lol。任何帮助,将不胜感激。
简单而重要。 +1。 – Joey 2010-08-10 16:55:51
+1并删除我的答案,因为你击败了我8秒。 – 2010-08-10 16:57:03
谢谢! **快速注释**,如果您不需要从字符串的开头到结尾进行匹配,或者您不需要捕获组:[(?:[2-9] | 1 [0-6] )' – skplunkerin 2016-12-22 16:16:12