Back to Home

Regular Expressions

What are Regular Expressions?
A powerful notation for describing patterns in text

In arithmetic, we can use operations like + and × to build up expressions such as (5+3) × 4. Similarly, we can use the regular operations to build up expressions describing languages, which are called regular expressions.

A regular expression is a pattern that describes a set of strings. The value of a regular expression is a language - the set of all strings that match the pattern.

Regular expressions have an important role in computer science applications:

  • Text search and manipulation
  • Input validation in forms
  • Lexical analysis in compilers
  • Data extraction and transformation
  • Pattern matching in programming languages

Regular Expression to Automaton

(a|b)*abb
Thompson's
Construction
NFA
Subset
Construction
DFA