## With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

No credit card required

## Regular Expression

### 4.1 BASICS OF REGULAR EXPRESSION

Q. What is Regular Expression?

Ans. A regular expression can be defined as a language or string accepted by a finite automata.

We know that a finite automata consists of five touples {Q, Σ, δ, q0, F}. Among them a Regular Expression is a string on Σ, i.e. it will consist only with input alphabets.

In short a Regular Expression is written as RE.

Q. Give some formal recursive definition of Regular Expression

Ans.

(i) Any terminals, i.e. the symbols belong to Σ are Regular Expression. Null string(Λ) and Null set(Φ) are also Regular Expression.

(ii) If P and Q are two Regular Expressions then the union of the two Regular Expressions denoted by P + Q is also a Regular Expression.

(iii) If P

## With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

No credit card required