Regular Expressions Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

Regex metacharacter for 0 or more repetitions

A

a*

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

Regex metacharacter for 1 or more repetitions

A

a+

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

Regex metacharacter for 0 or 1 repetition

A

? (eg. a?)

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

Regex metacharacter for β€˜or’

A

a | b

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

Regex metacharacter for any character in a list of characters

A

[] (eg. [abc] allows a, b, or c)

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

Regex metacharacter for any character that is not in a list of characters

A

[^] (eg. [^abc] allows anything except a, b, or c)

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

Regex metacharacter for any character that is in a range of characters

A

[x-y] (eg. [a-z] allows any character from a to z)

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