PacktLib: Mastering Python Regular Expressions

Mastering Python Regular Expressions

Credits

About the Authors

About the Reviewers

www.PacktPub.com

Preface

Introducing Regular Expressions

History, relevance, and purpose

The regular expression syntax

Summary

Regular Expressions with Python

A brief introduction

Backslash in string literals

Building blocks for Python regex

Compilation flags

Python and regex special considerations

Summary

Grouping

Introduction

Backreferences

Named groups

Non-capturing groups

Special cases with groups

Overlapping groups

Summary

Look Around

Look ahead

Look around and substitutions

Look behind

Look around and groups

Summary

Performance of Regular Expressions

Benchmarking regular expressions with Python

The RegexBuddy tool

Understanding the Python regex engine

Optimization recommendations

Summary

Index