Wednesday, June 27, 2012

Regular expression


Regular expressions are mathematical symbolism which describe the set of strings of specific language. It provides convenient and useful notation for representing tokens. Here are some rules that describe definition of the regular expressions over the input set denoted by ∑
 1) € is a regular expression that denotes the set containing empty string.                   
 2) If R1 and R2 are regular expressions then R=R1+R2 (same can also be represented as R=R1/R2)is also  regular expression which represents union operation.                                                                                                                  
 3) If R1 and R2 are regular expressions then R=R1.R2 is also a regular expression which represents concatenation operation.                                                                    
 4) If R1 is a regular expression then R=R1* is also a regular expression which represents kleen closure.
 A language denoted by a regular expression is said to be a regular set or regular language.

4 comments: