Contribute Media
A thank you to everyone who has made this possible: Read More

An introduction to regular expressions in Python

Summary

Regular expressions are a mini-language used for pattern-matching in text. They have been a staple of the computing world for decades: they are implemented in most programming languages, form the core of several utilities, and can be found lurking in the search-and-replace functionality of any sufficiently advanced text editor. Despite their usefulness, regular expressions have developed a reputation for complexity and a steep learning curve. New programmers are often warned to steer clear of them -- which is a pity, because there are some problems for which they are a quick and elegant solution. In this talk I aim to demystify regular expressions for the beginner programmer, and to provide a brief guided tour of Python's re module. I hope to encourage more programmers to get to know this useful tool.

Details

Improve this page