Edit product

Python re(gex)?


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

Book details

Scripting and automation tasks often need to extract particular portions of text from input data or modify them from one format to another.

This book will help you learn Python Regular Expressions, a mini-programming language for all sorts of text processing needs.

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.

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

Exercises are also included to test your understanding.


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

Sample chapters

For a preview of the book, see sample chapters at 


GitHub repo

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

19 ratings

  • You'll get PDF and EPUB versions of the book.
  • Length113 pages
  • Last Updated2021-01-09


Python re(gex)?

Enter your info to complete your purchase

Give as a gift


or pay with
pp paypal
You'll be charged US$10.