The non-greedy regex modifiers are like their greedy counter-parts but with a ?
(非贪婪的正则表达式修饰符就像贪婪的对应部分一样,但带有?
)
immediately following them:(立即关注他们:)
* - zero or more
*? - zero or more (non-greedy)
+ - one or more
+? - one or more (non-greedy)
? - zero or one
?? - zero or one (non-greedy)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…