Questions about regular expressions, a formalism to describe regular languages.
Questions about regular expressions, a formalism to describe regular languages.
If you are asking about how to find a regular expression for some language, please consult How do I find a regular expression for a particular language? before asking, and show what progress you have made.
Note that regular expressions in a computer science context are not the same as POSIX RegExp or similar. A regular expression in the formal language sense $R$ can be one of
- the empty language $\emptyset$,
- the empty string $\varepsilon$ (also $\lambda$),
- an individual symbol $a \in \Sigma$ with $\Sigma$ some finite alphabet,
- a concatenation $R_1 \cdot R_2$,
- an alternative $(R_1 \mid R_2)$ (often $+$ is used) and
- a Kleene star $(R_1)^*$.
See the corresponding Wikipedia article for details.
Related: regular-languages, finite-automata