A regular language is a formal language recognized by a finite automaton. Equivalently, regular languages are exactly the languages denoted by regular expressions (Hopcroft et al. 2000).
The class of regular languages contains the empty language and every language consisting of a single string. It is closed under union, intersection, complement, concatenation, and the operation of taking all finite concatenations of words from a language. These closure properties provide ways to construct regular languages. The pumping lemma gives a necessary property of every regular language and is commonly used to prove that a formal language is not regular.