相关疑难解决方法(0)

`Greedy`和`Reluctant`正则表达式量词有什么区别?

来自Patternjavadocs:

Greedy quantifiers:
X?      X, once or not at all  
X*      X, zero or more times  
X+      X, one or more times  
X{n}    X, exactly n times  
X{n,}   X, at least n times  
X{n,m}  X, at least n but not more than m times

Reluctant quantifiers:
X??     X, once or not at all  
X*?     X, zero or more times  
X+?     X, one or more times  
X{n}?   X, exactly n times  
X{n,}?  X, at least n times  
X{n,m}? X, …

java regex

22
推荐指数
2
解决办法
1万
查看次数

标签 统计

java ×1

regex ×1