The Bloody History of Regex

A 70 year history of creation of Regex - a set of symbols that describes a text pattern.

1940-01-01 14:13:34

First Efforts

Regular expressions got their start in the field of neuroscience, way back in the 1940s

1943-01-01 05:55:45

McCulloch and Pitts

McCulloch and Pitts developed models describing how the human nervous system works, or how a machine or a computer could be built to act more like a human brain

1956-09-07 14:23:50

Regular Sets and Regular Expressions

In 1956, Stephen Kleene described these models with an algebra that he called regular sets, and he created a notation to express them called regular expressions

1960-09-07 14:23:50

Still on the black board!!

The term regular expressions were coined by Kleene, but they still did not enter computer world.

1965-01-08 05:53:22

AND THERE WILL BE UNIX!

Unix (officially trademarked as UNIX) is a multitasking, multi-user computer operating system that exists in many variants. The original Unix was developed at AT&T's Bell Labs research center by Ken Thompson, Dennis Ritchie, and others.

1968-12-19 07:09:57

Regex go Unix.

Ken Thompson, an early computer pioneer and one of the key developers of UNIX implemented regular expressions inside an early UNIX text editor that he was building called ed. This is the point at which regular expressions entered the computer world, and it happens right there at the birth of UNIX. So the future of regular expressions and UNIX is very much tied together.

1969-11-02 11:05:55

this is ed and grep

To search a text in ed for a regular expression type: g/regex/p The g and the p were modifiers. The g was telling you to globally search for this expression, search everywhere, and p was to output the results to the screen, to print them. So we end up with a global regular expression print, or for short, grep. It becomes a verb.

1970-07-26 16:57:33

It is a bloody chaos

With the evolution of grep, egrep and new programming languages and standards more incompatibilities appear in regex.

1986-01-16 05:00:48

POSIX (Portable Operating System Interface + X for UNIX)

In 1986, everyone sits down and comes up with a standard, which they call POSIX. It is a standard that is designed to ensure compatibility between different operating systems. So the first thing that it does is that there are going to be two different kinds of regular expressions. There's going to be BREs, which are basic regular expressions, and that's essentially what grep is, and then there's going to be EREs which are extended regular expressions, and that's what egrep is. So now all programs and programmers have to decide, are we going to try and implement them in the flavor of BREs or EREs? And it's a very clearly defined set of rules about what should match and what shouldn't match, what symbols should mean something in each one of these. Now it's not expected that BREs and EREs ought to be interchangeable, but at least we have two clear paths forward. And BRE is really maintained for compatibility in old tools and EREs is what most modern tools are going to use.

1986-02-14 03:11:20

C

Henry Spencer writes a regex library that's written in the C programming language. And what's great about the fact that it's a library is that can be incorporated into other programs, and so it provides consistency because then everyone who uses his library, their regular expressions all work the same way. So things at this point have become more consistent and the changes to regular expressions have really stabilized

1987-03-09 00:19:27

Perl Release

In 1987, Larry Wall releases the Perl programming language. It uses Spencer's regex library, but over time, it adds many more powerful features. Perl's real mission was to try and be a programming language that was designed to be really useful, and so it added more powerful features to make it more useful. And because of these powerful features, it really becomes the gold standard of the way that people want their regex libraries to work.

1987-10-04 09:58:20

Regex today

So we have Perl-compatible languages and programs that are out there. So Apache, C, C++, the .NET languages, Java, JavaScript, MySQL, PHP, Python, Ruby, all of those are endeavoring to be Perl-compatible languages and programs. There's also a library called the PCRE library that stands for Perl-Compatible Regular Expression library. It was the rise of the web that gave a big boost to the Perl implementation of regex, and that's where we get the modern syntax of regular expressions today; it really comes from Perl.

The Bloody History of Regex

Launch
Copy this timeline Login to copy this timeline 3d Game mode

Contact us

We'd love to hear from you. Please send questions or feedback to the below email addresses.

Before contacting us, you may wish to visit our FAQs page which has lots of useful info on Tiki-Toki.

We can be contacted by email at: hello@tiki-toki.com.

You can also follow us on twitter at twitter.com/tiki_toki.

If you are having any problems with Tiki-Toki, please contact us as at: help@tiki-toki.com

Close

Edit this timeline

Enter your name and the secret word given to you by the timeline's owner.

3-40 true Name must be at least three characters
3-40 true You need a secret word to edit this timeline

Checking details

Please check details and try again

Go
Close