Regular Expressions Flashcards

1
Q

The sentence must start with “word”

A

^word

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

find a-l

A

[a-l]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Everything except a-l

A

[^a-l]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

color and colour will both be found

A

colou?r

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

a in bar can match one, many times or not at all

A

ba*r

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

e in ber and beer can occur one or more times

A

be+r

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Out of br ber beer beeer we only want to search for when the 3 appears twice

A

be{2}r

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

The letter e in beer and beeer can occur at least 3 times in a row

A

be{3,}r

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

The letter in in beer can occur between one and three times

A

be{1,3}r

How well did you know this?
1
Not at all
2
3
4
5
Perfectly