← All topics
Quiz: Regular Expressions: questions with answers
10 questions, each with the answer and a short explanation.
Take the timed quiz + get a certificate →- Q1. Which regex describes binary strings ending in 01?
- Q2. What does ab mean?
- Q3. Which operation are regular languages NOT closed under?
- Q4. Which regex describes strings with no two consecutive 1s (verified in the demo)?
- Q5. Why should you avoid patterns like (a+)+$ on user input?
- Q6. Which regex describes all binary strings of even length?
- Q7. Using the precedence rules, how is ab + c read?
- Q8. Which identity is correct?
- Q9. What does this print? (code)
- Q10. Arden's theorem gives the solution of R = Q + RP (when P does not contain ε). What is it?