开发者

Double plusses in regex

I have seen several regular expressions that have two plusses in a row. What exactly does this mean? One or more of one or more of the pattern. If the pattern matches in 开发者_开发知识库the first place, why would the second match be necessary?

Examples:

[a-zA-Z0-9_]++
[^/.,;?]++


They're called possessive quantifiers.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜