We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Re-Discovering Python's Regular Expressions

Formal Metadata

Title
Re-Discovering Python's Regular Expressions
Title of Series
Part Number
38
Number of Parts
169
Author
License
CC Attribution - NonCommercial - ShareAlike 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal and non-commercial purpose as long as the work is attributed to the author in the manner specified by the author or licensor and the work or content is shared also in adapted form only under the conditions of this
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
Ilia Kurenkov - re-Discovering Python's Regular Expressions As Armin Ronacher pointed out in a recent blog post, there is more to Python's regular expression module than meets the eye. His post made me wonder what other “hidden gems” are stashed away in Python’s `re`. In the talk I share what I’ve learned about the inner workings of this extremely popular and heavily used module. ----- Anyone who has used Python to search text for substring patterns has at least heard of the regular expression module. Many of us use it extensively for parsers and lexers, extracting information . And yet we know surprisingly little about its inner workings, as Armin Ronacher demonstrated in his recent blog post, “Python's Hidden Regular Expression Gems”. Inspired by this, I want to dive deeper into Python’s `re` module and share what I find with folks at EuroPython. My goal is that at the end of the day most of us walk away from this talk with a better understanding of this extremely useful module. Here are a few examples of the kinds of things I would like to cover: - A clear presentation of `re`’s overall structure. - What actually happens behind the scenes when you “compile” a regular expression with `re.compile`? - What are the speed implications of using a callable as the replacement argument to `re.sub`? - re.MatchObject interface: `group` vs. `groups` vs `groupdict` To keep the talk entertaining as well as educational I plan to pepper it with whatever interesting and/or funny trivia I find about the module’s history and structure.