The History Of Regex
The history of Regular Expressions
Regular expressions – commonly known as regexes – are a text processing tool used by modern programming languages, as well as popular tools like text editors. At its core, a regular expression is a search pattern (a set of symbols) that helps you match, locate and manage text – making it easier to extract information from code, log files, spreadsheets and documents. Surprisingly, the idea behind regexes did not originate as a computer science tool, but instead, regular expressions were created in the neuroscience field. So how was this powerful tool first developed and how has the use of regular expressions evolved over the years?
Creation of Regular Expressions
In 1943, Warren S. McCulloch (Neuroscientist) and Walter Pitts (Logician) began to develop models describing how the human nervous system works. Their research focused on trying to understand how the brain could produce complex patterns using simple cells that are bound together. In 1956, mathematician Stephen Kleen described McCulloch-Pitts neural models with an algebra notation that he penned ‘regular expressions’. Influenced by Kleen’s notion, in 1968, mathematician and Unix pioneer, Ken Thompson, implemented the idea of regular expressions inside the text editor, ‘ed’. His aim was that ed users would be able to do advanced pattern matching in text files. ed soon evolved to have the functionality to search based on regular expressions – this is when regexes entered the computing world.
Evolution of regular expressions
Many people have contributed to the development and promotion of regular expressions since they entered popular usage in ed software. Notably, Larry Wall’s Perl programming language from the late 80s helped regular expressions to become mainstream. Perl was originally designed as a flexible text-processing language but grew into a fully-fledged programming language that remains a natural choice for any text-processing to this day. The programme still relies heavily on the use of regexes.
Future of regular expressions
Despite being hard to read, hard to validate, hard to document and notoriously hard to master, regexes are still widely used today. Supported by all modern programming languages, text processing programs and advanced text editors, regexes are now used in more than a third of both Python and JavaScript projects. With this in mind, over 50 years since their inception, the use of regexes seems very much here to stay.
We use Regex in our solutions
We love regex and we use it to pattern match barcodes in our Batch Scanning With Barcodes solutions or to match text patterns in our Batch Scanning with OCR Zones. For details of all our solutions please click here
Recent Blog Posts
Click here for all of our latest blog posts.
How OCR Works: Turning Scanned Documents into Searchable Text
Understanding how OCR works can help businesses turn paper files, scanned PDFs, and image-based...
How Barcode Document Separation Works
Learn how barcode document separation works and how it helps businesses automate scanning, split files, reduce errors, and organize documents more efficiently.
How TWAIN Scanning Works
TWAIN scanning is one of the most common ways desktop applications communicate with document...




