Module 4 - Regular Expression
Module 4 - Regular Expression
Expression
Expressions
Equivalence: Every regular
expression has an equivalent finite
automaton and vice versa. They are
two different representations of the
same set of regular languages.
Components of
Regular
Expressions
Basic Symbols
Example:
L* = Zero or more occurrence of language
L.
Precedence of
Operators:
2. Concatenation
The concatenation of two regular languages, L1 and
L2, which are represented using L1.L2 is also regular,
and which represents the set of strings that are
formed by taking any string in L1 concatenating it
with any string in L2.
• Example:
Example:
Where:
• Example 2: Union
Expression: a + b
Language: { "a", "b" }
Regular Expression
Examples:
• Example 3: Concatenation
Expression: ab
Language: { "ab" }