Whereas the contrary bringeth bliss, And is a pattern of celestial peace. Whom should we match with Henry, being a king. . .
A regular expression is the specification of the syntax of a
simple language. Regular expressions are used with methods to search, replace, and
extract information from strings. The methods that work with regular expressions are
will all be described in Chapter 8. Regular expressions usually have a
significant performance advantage over equivalent string operations in
Regular expressions came from the mathematical study of formal languages. Ken Thompson adapted Stephen Kleene's theoretical work on type-3 languages into a practical pattern matcher that could be embedded in tools such as text editors and programming languages.