Professional Documents
Culture Documents
Lecture 2
Lecture 2
OutLine
How to make Regular Expression?
Create RE that starts with a
Create RE that end with a
Create RE that start and end with a
Create RE that starts with a
Accepted words
Ab
Abaaa
Aaaaa
Abbbbb
Rejected words
B
Ba
Baab
a(a+b)*
Create RE that end with a
Accepted words
ba
Abaaa
Aaaaa
Abbbbba
Rejected words
B
aB
Baab
a(a+b)*
Create RE that start and end with a
Accepted words
aba
Abaaa
Aaaaa
Abbbbba
Rejected words
B
aB
Baab
abaab
a(a+b)*a
Next lecture agenda
Create RE that starts with a and end
with b
Create RE that starts with b and end
with a
Create RE that start and end with
different letters