Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why are regular expressions called "regular" expressions?

Tags:

regex

history

Why are regular expressions called regular expressions?

like image 880
Nick Pierpoint Avatar asked Jun 10 '09 13:06

Nick Pierpoint


People also ask

What is called regular expression?

A regular expression (shortened as regex or regexp; sometimes referred to as rational expression) is a sequence of characters that specifies a search pattern in text. Usually such patterns are used by string-searching algorithms for "find" or "find and replace" operations on strings, or for input validation.

What makes a regular expression regular?

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.

Are regular expressions regular?

Regular expressions are used to denote regular languages. They can represent regular languages and operations on them succinctly. The set of regular expressions over an alphabet is defined recursively as below. Any element of that set is a regular expression.

What is the relation between regular expression and regular language?

Regular Expressions are an algebraic way to describe languages. Regular Expressions describe exactly the regular languages. If E is a regular expression, then L(E) is the regular language it defines. For each regular expression E, we can create a DFA A such that L(E) = L(A).


1 Answers

They are based on regular languages.

like image 76
Oliver N. Avatar answered Oct 11 '22 17:10

Oliver N.