Table of contents : Cover Copyright Credits About the Authors About the Reviewers www.PacktPub.com Table of Contents Preface Chapter 1: Introducing Regular Expressions History, relevance, and purpose The regular expression syntax Literals Character classes Predefined character classes Alternation Quantifiers Greedy and reluctant quantifiers Boundary Matchers Summary Chapter 2: Regular Expressions with Python A brief introduction Backslash in string literals String Python 2.x Building blocks for Python regex RegexObject Searching Modifying a string MatchObject group([group1 ...]). Overlapping groupsSummary Chapter 4: Look Around Look ahead Negative look ahead Look around and substitutions Look behind Negative look behind Look around and groups Summary Chapter 5: Performance of Regular Expressions Benchmarking regular expressions with Python The RegexBuddy tool Understanding the Python regex engine Backtracking Optimization recommendations Reuse compiled patterns Extract common parts in alternation Shortcut to alternation Use non-capturing groups when appropriate Be specific Don't be greedy Summary Index.