C.W.K.
Stream
Quiz · 5 questions

Quantifiers

How many times? Greedy, lazy, possessive — and the engine moves you can't see

Level 0Pattern-Curious
0 XP0/90 lessons0/15 achievements
0/100 XP to next level100 XP to go0% complete

Quiz

01Which quantifier means 'zero or more times'?
Hint
Star is permissive — even zero matches.
02Pattern <.*> against input <a><b> matches what?
Hint
Greedy means LONGEST possible.
03Why is [^X]* often preferred over .*??
Hint
Negated classes don't backtrack.
04Pattern foo? matches what?
Hint
? applies to ONE preceding char unless grouped.
05What does the captured group return for (ab)+ matched against abababab?
Hint
A repeated capture group keeps only the LAST iteration.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.