updated: 2022-01-23_12:32:30-05:00
Regular Expression
Using symbols to represent sections of strings
- Examples:
- Grep
- awk
- reg exp
- PERL
Notation
(0,1)0*
$\Sigma$ -> language of all strings over the alphabet of length 1
Formal Definition:
- A regular expression R over an alphabet $\Sigma$ is one of the following:
- a for some $a\in \Sigma$
- $\epsilon$ empty string
- $\null$ empty set
- R1 Union R2 where R1 and R2 are regular Expressions
- R1$.$R2
- R1^*
It is possible to concatenate with an empty set
Anything union empty set or epsilon is itself
Something concatenated with an empty set is an empty set
{0,e}{1,e}={01,0,1,e}
- L(R): Language of R the regular language is the set of all strings accepted by R