← Quiz: Regular Expressions: all 10 questions
Quiz: Regular Expressions · Question 6 of 10
Which regex describes all binary strings of even length?
Which regex describes all binary strings of even length?
- A.(0+1)*
- B.(00)*
- C.((0+1)(0+1))*
- D.01
Answer & explanation
Correct answer: ((0+1)(0+1))*
Each repetition adds exactly two symbols, so every string has even length.
Can you get the rest right without peeking?
Take the timed Quiz: Regular Expressions quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →