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

Formale Metadaten

Titel
Re-Discovering Python's Regular Expressions
Serientitel
Teil
38
Anzahl der Teile
169
Autor
Lizenz
CC-Namensnennung - keine kommerzielle Nutzung - Weitergabe unter gleichen Bedingungen 3.0 Unported:
Sie dürfen das Werk bzw. den Inhalt zu jedem legalen und nicht-kommerziellen Zweck nutzen, verändern und in unveränderter oder veränderter Form vervielfältigen, verbreiten und öffentlich zugänglich machen, sofern Sie den Namen des Autors/Rechteinhabers in der von ihm festgelegten Weise nennen und das Werk bzw. diesen Inhalt auch in veränderter Form nur unter den Bedingungen dieser Lizenz weitergeben
Identifikatoren
Herausgeber
Erscheinungsjahr
Sprache

Inhaltliche Metadaten

Fachgebiet
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.