Regular expression
Appearance
Regular expression is a formal notation for describing patterns in strings, originally developed in the 1950s by Stephen Kleene as a notation for regular languages in formal language theory. A regex specifies a set of strings through operations like alternation, concatenation, and Kleene star, and it can be compiled into a finite automaton for efficient recognition. Though regexes are often dismissed as syntactic conveniences, they are the simplest non-trivial instance of pattern matching — and the tension between their declarative syntax and imperative backtracking implementations reveals much about how computational systems trade expressiveness for efficiency.