Yr2 Regular Expressions Flashcards

(8 cards)

1
Q

What does is the function of +

A

One or more repetitions required

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

What is the function of ?

A

0 or one repetitions required

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

What is the function of |

A

Means or

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

What does [abc] mean?

A

a or b or c

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

What is the function of *

A

Means 0 or more repetitions required

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

What does [^abc] mean?

A

Any characters except a or b or c

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

What does [a-z] mean?

A

Any lowercase character in range a-z

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

Write a regular expression that matches:
The letter b, followed by zero or more occurrences of “cd”, followed by a single e or “fg”

A

b(cd)*(e|fg)

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