Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors

What do you mean by regular expression ? Write the formal recursive definition of a regular expression.

1.Regular expression is a formula in a special language that is used for specifying simple classes of strings.

2.A string is a sequence of symbols; for the purpose of most text-based search techniques, a string is any sequence of alphanumeric characters (letters, numbers, spaces, tabs, and punctuation).

Formal recursive definition of regular expression :

Formally, a regular expression is an algebraic notation for characterizing a set of strings.

1.Any terminals, i.e., the symbols belong to S are regular expression. Null string (^, ε) and null set () are also regular expression.

2.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.

3.If P and Q are two regular expressions then their concatenation denoted by PQ is also a regular expression.

4.If P is a regular expression then the iteration (repetition or closure) denoted by P* is also a regular expression.

5.If P is a regular expression then P, is a regular expression.

6.The expressions got by repeated application of the rules from (1) to (5) over ∑are also regular expression.

Leave a Comment