Section 9 Chapter 52 - Regular Expressions Flashcards

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

|

A

OR

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

?

A

Optional (preceding element)

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

*

A

zero or more (preceding element)

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

+

A

one or more (preceding element)

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

Regular Expression

A

A simple way to describe a set

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

Regular expression for a 0 followed by any binary string

A

0(0|1)+

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

Common uses of regular expressions (3)

A
  • To match patterns to text files
  • By compilers to recognise syntax
  • By programs to validate input
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Regular language

A

A language that can be represented with a regular expression (or a FSM)

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

Relationship between regular expressions and FSM

A

They are equivalent ways of describing a regular language

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