Quantifiers Flashcards

0
Q

*

A

Match 0 or more times. Example: ab* matches a, ab, abb, abbb etc.

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

?

A

Match 0 or 1 times. Example: ab? matches a and ab

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

+

A

Match 1 or more times. Example: ab+ matches ab, abb, abbb etc.

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

{n}

A

Match exactly n times. Example: ab{2} matches abb

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

{n,}

A

Match n or more times. Example: ab{2,} matches abb, abbb, abbbb etc.

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

{n,m}

A

Match at least n times, but no more than m times. Example: ab{2,3} matches abb and abbb

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

??

A

Match 0 or 1 times, but as few times as possible. Example: ab?? against abbbbb matches a

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

*?

A

Match 0 or more times, but as few times as possible. Example: ab*? against abbbbb matches a

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

+?

A

Match 1 or more times, but as few times as possible. Example: ab+? against abbbbb matches ab

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

{n}?

A

Match n or more times, but as few times as possible. Example: ab{2}? against abbbbb matches abb

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

{n,m}?

A

Match at least n times, no more than m times, but as few times as possible. Example: ab{2,3}? against abbbbb matches abb

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