# Regex

## Python Regex Greedy vs Non-Greedy Quantifiers

Ready to earn the black belt of your regex superpower? This tutorial shows you the subtle but important difference between greedy and non-greedy regex quantifiers. You can also watch the explainer video I created for this article: If you’re a busy person, here’s the short version of this tutorial: Definition Greedy Quantifier: A greedy quantifier …

## Python Character Set [Regex Tutorial]

This tutorial makes you a master of character sets in Python. (I know, I know, it feels awesome to see your deepest desires finally come true.) As I wrote this article, I saw a lot of different terms describing this same powerful concept such as “character class“, “character range“, or “character group“. However, the most …

## Python Regex Syntax [2-Minute Primer]

A regular expression is a decades-old concept in computer science. Invented in the 1950s by famous mathematician Stephen Cole Kleene, the decades of evolution brought a huge variety of operations. Collecting all operations and writing up a comprehensive list would result in a very thick and unreadable book by itself. Related article: Python Regex Superpower …

## Python Regex Methods – A Short Overview

Python’s re module comes with a number of regular expression methods that help you achieve more with less. Related article: Python Regex Superpower – The Ultimate Guide Think of those methods as the framework connecting regular expressions with the Python programming language. Every programming language comes with its own way of handling regular expressions. For …

## Python Regex Superpower [Full Tutorial]

What’s the best-kept productivity secret of code masters? Here’s what ex-Google’s tech lead says is the most important skill as a coder (spoiler: it has to do with the topic of the tutorial): Congratulations – you’re about to become a regular expression master. I’ve not only written the most comprehensive free regular expression tutorial on …

## Python Regex And Operator [Tutorial + Video]

This tutorial is all about the AND operator of Python’s re library. You may ask: what? (And rightly so.) Sure, there’s the OR operator (example: ‘iPhone|iPad’). But what’s the meaning of matching one regular expression AND another? There are different interpretations for the AND operator in a regular expression (regex): Ordered: Match one regex pattern after …

## Python Regex Or – A Simple Illustrated Guide

This tutorial is all about the or | operator of Python’s re library. You can also play the tutorial video while you read: Related article: Python Regex Superpower – The Ultimate Guide What’s the Python Regex Or | Operator? Given a string. Say, your goal is to find all substrings that match either the string ‘iPhone’ …

## Python Regex – How to Match the Start of Line (^) and End of Line (\$)

This article is all about the start of line ^ and end of line \$ regular expressions in Python’s re library. These two regexes are fundamental to all regular expressions—even outside the Python world. So invest 5 minutes now and master them once and for all! You can also listen to the video as you scroll …

## The Python Re Plus (+) Symbol in Regular Expressions

This article is all about the plus “+” symbol in Python’s re library. Study it carefully and master this important piece of knowledge once and for all! You can also watch the article video while you read over the explanations: Related article: Python Regex Superpower – The Ultimate Guide What’s the Python Re Plus + Quantifier? …