Regular expression
![The regexp (?<=\.) 2,(?=[A-Z]) matches at least two spaces occurring after period (.) and before an upper case letter as highlighted in the text above.](/uploads/202412/23/The_river_effect_in_justified_text5243.jpg)

In theoretical computer science and formal language theory, a regular expression (sometimes called a rational expression) is a sequence of characters that define a search pattern, mainly for use in pattern matching with strings, or string matching, i.e. "find and replace"-like operations. The concept arose in the 1950s, when the American mathematician Stephen Kleene formalized the description of a regular language, and came into common use with the Unix text processing utilities ed, an editor, and grep, a filter.