Regular Expressions Flashcards
1
Q
The sentence must start with “word”
A
^word
2
Q
find a-l
A
[a-l]
3
Q
Everything except a-l
A
[^a-l]
4
Q
color and colour will both be found
A
colou?r
5
Q
a in bar can match one, many times or not at all
A
ba*r
6
Q
e in ber and beer can occur one or more times
A
be+r
7
Q
Out of br ber beer beeer we only want to search for when the 3 appears twice
A
be{2}r
8
Q
The letter e in beer and beeer can occur at least 3 times in a row
A
be{3,}r
9
Q
The letter in in beer can occur between one and three times
A
be{1,3}r