And now for something completely different.

How to do regex and not destroy your computer in the process.

Danny Engelbarts

Compiler and Interpreters Mind Bending Programming Python Skills Tooling

See in schedule Download Slides

The goal of this talk is to show the audience a different way of thinking about and developing regex statements.

I have been working with UNIX for decades now and, although i always managed to avoid Perl, i have been intrigued with Regex constructs ever since my first encounter. These weird unreadable things that can transform text like nothing else or can find what i’m looking for in massive files, in no time at all. I’ve created regexes that only appeal to the most nerdiest of nerds and i’ve stunned colleagues by fixing their futile regex attempts in just a few keystrokes. But when Damian Conway showed me how regexes really work i was awestruck. And now i want to share this knowledge.

This talk is aimed at pythonistas that have some experience with the re module. I will take some easy examples and explain in plain english how a regex engine searches for a match. This will show that a regex is not some mysterious incomprehensible pattern description or declarative blueprint. Instead it is a small program that is very good at comparing single characters. Like any programming language it turns out that once you understand the rules and structure it suddenly becomes so much easier to use.

With this new found knowledge we will up the ante and try some more difficult stuff, adding other semantics and some tips and tricks. We’ll look at some pitfalls, maybe compare regex to python solutions and have a look at some regexes found in the wild (either on my drive or on github).

Type: Talk (60 mins); Python level: Intermediate; Domain level: Beginner


Danny Engelbarts

Belastingdienst (EN: Dutch Tax Organisation)

Danny started as a Progress programmer back in 1990. He has worked in IT ever since, at various companies. Among them are Philips, DAF Trucks and different government bodies like The province of Utrecht, Nijmegen municipality and the Dutch Tax Office.

He has a very broad number of skills, he's been systems administrator, DBA, system engineer. He's programmed systems in Python, C, Java, Javascript and of course used all sorts of scripting languages like bash, awk, sed and ksh. He knows UNIX/Linux like the back of his hand, used to be a Red Hat Certified Architect and also worked with SCO Unix, HP, AIX and z/OS.