Task 2 Flashcards
1
Q
The set of all alphabetic strings.
A
RE: /[a-zA-Z]+/
2
Q
The set of all lowercase alphabetic strings ending in a ‘b’.
A
RE: /[a-z]*b/
3
Q
The set of all strings with two consecutive repeated words (e.g., “Humbert Humbert” and “the the” but not “the bug” or “the big bug”).
A
RE: /\b(\w+)\s+\1\b/
4
Q
The set of all strings from the alphabet a,b such that each a is immediately preceded and immediately followed by a b.
A
RE: /(b+(ab+))+?/
5
Q
text:
ab
aba
abaabaab
A
RE: /(aba?)+/