Basics of Regular Expressions Flashcards

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

How are regular expressions typically enclosed in programming languages?

A

within forward slashes (/) to define them as regular expression literals; may vary depending on the language and context

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

Why are single or double quotes used when using regular expressions in shell?

A

to prevent the shell from interpreting special characters within the regular expression

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

What is a literal?

A

value that is represented exactly as it appears, without any special interpretation or modification

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

What is used to indicate that a character should be treated as a literal and not as a metacharacter?

A

backslash; e.g. ` *`

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