Polyglot pattern matching in London

Years ago I created a training class that has proved one of my most enduring, popular...and frustrating: Understanding Perl Regexes.

The class has endured because regexes are still one of the sharpest blades on the Swiss Army Chainsaw, and have consistently become even sharper with almost every major release of Perl, as new features have been added and the underlying implementation has been improved.

The class has been popular because all those powerful added features have also made Perl's regex dialect more complex, more line-noisy, and sometimes just plain scarier than anyone else's. Having someone to guide you though the labyrinth can be invaluable so I've kept looking for ways to help students see beyond the complexity and come to grips with what regexes really are, how they actually work, and how they can be deliberately designed (you know, instead of just metastasizing).

And yet the class has been frustrating too. Nearly every time I run it there will be someone who missed the word "Perl" in the title and was expecting a tutorial on some differently abled regex variant that they're forced to use in their native Java, or Python, or Emacs, or Vim, or egrep, or sed, or whatever else they're stuck with. For those poor devils, it's like coming to a class that you thought was going to cover basic Newtonian physics, only to discover that it's actually about 11-dimensional string theory. In Klingon.

So, over the past year I've been working on a new version of the course: one that covers all the same fundamentals, advanced features, tricks, pitfalls, and design techniques from the original Perl class...just without the Perl. Or rather, still with the Perl, but also with Java and Python and Emacs, and Vim and egrep and sed, etc., etc. It's a language-agnostic version that covers the full syntax and semantics of all six major dialects of regexes.

And together with FlossUK and O'Reilly, I'll be offering that class for the first time next month. In London. It's a one-day event, to be held at The Ambassadors Hotel (near Euston station) on Wednesday 12th March.

So, if you've ever wished you understood regexes better in <your language here>, or if you already understand regexes well in <shiny language A> but can't seem to translate that to <stupid language B>, then this is your opportunity. Registrations are open now.

PS: There are substantial discounts for anyone with a FlossUK membership (so it's vastly cheaper to join up before you book in for the class ;-)

Leave a comment

About Damian Conway

user-pic