Python re(gex)?
Python re(gex)?
Free!
Minimum price
$15.00
Suggested price
Python re(gex)?

Last updated on 2020-07-24

About the Book

I love your books on regex...As a student from the Digital VLSI space, it is indeed useful now and definitely in the future. It's really well written and really easy to understand the examples — feedback on reddit

The book heavily leans on examples to present features of regular expressions one by one. It is recommended that you manually type each example and experiment with them.

You should have prior experience working with Python, should know concepts like string formats, string methods, list comprehension and so on.

Both standard re module and popular third party regex module is covered in this book.

Exercises are also included to test your understanding.

Visit https://github.com/learnbyexample/py_regular_expressions for code snippets and exercise files. The repo also has solutions for exercises.

  • Share this book

  • Feedback

    You must own a copy of this Book to access the forums

    Email the Author(s)

About the Author

Sundeep Agarwal
Sundeep Agarwal

Sundeep Agarwal is a freelance trainer, author and mentor. His previous experience includes working as a Design Engineer at Analog Devices for more than 5 years. You can find his other works, primarily focused on Linux command line, text processing, scripting languages and curated lists, at https://github.com/learnbyexample. He has also been a technical reviewer for Command Line Fundamentals book and video course published by Packt.

Bundles that include this book

Ruby Regexp
Python re(gex)?
$20.00
Suggested Price
$0.00
Bundle Price
Python 201
Python re(gex)?
$39.99
Suggested Price
$14.99
Bundle Price
Ruby Regexp
Python re(gex)?
JavaScript RegExp
GNU GREP and RIPGREP
GNU SED
$74.00
Suggested Price
$0.00
Bundle Price

Table of Contents

1. Preface

2. Why is it needed?

3. re introduction

4. Anchors

5. Alternation and Grouping

6. Escaping metacharacters

7. Dot metacharacter and Quantifiers

8. Interlude: Tools for debugging and visualization

9. Working with matched portions

10. Character class

11. Groupings and backreferences

12. Interlude: Common tasks

13. Lookarounds

14. Flags

15. Unicode

16. regex module

17. Gotchas

18. Further Reading

Authors have earned$9,221,885writing, publishing and selling on Leanpub,
earning 80% royalties while saving up to 25 million pounds of CO2 and up to 46,000 trees.

Learn more about writing on Leanpub

The Leanpub 45-day 100% Happiness Guarantee

Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers), EPUB (for phones and tablets) and MOBI (for Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses! Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks. Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. It really is that easy.

Learn more about writing on Leanpub