本文介绍了正则表达式 - 超过 10 个字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您如何指示需要超过 10 个字符的正则表达式?我知道 '*' 大于 0,而 '+' 大于 1 但是需要 10 以上的语法是什么?谢谢大家!!!
How do you indicate a regex that you want to require more than 10 characters? I know that '*' is more than 0, and that '+' is more than 1 but what is syntax for requiring more than 10? Thanks all!!!!
推荐答案
您使用大括号表示法.例如,正则表达式 a{10,}
将匹配 10 个或更多 a
字符.a{10,20}
将匹配至少 10 个且不超过 20 个 a
s.
You use brace notation. For instance, the regex a{10,}
would match 10 or more a
characters. a{10,20}
would match at least 10 and no more than 20 a
s.
这篇关于正则表达式 - 超过 10 个字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!