开发者

Double plusses in regex

开发者 https://www.devze.com 2022-12-13 01:29 出处:网络
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

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

精彩评论

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