Each of them are quantifiers, the star quantifier(*
) means that the preceding expression can match zero or more times it is like {0,}
while the plus quantifier(+
) indicate that the preceding expression MUST match at least one time or multiple times and it is the same as {1,}
.
So to recap :
a* ---> a{0,} ---> Match a or aa or aaaaa or an empty string
a+ ---> a{1,} ---> Match a or aa or aaaa but not a string empty
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…