Python Re * – The Asterisk Quantifier for Regular Expressions

Every computer scientist knows the asterisk quantifier of regular expressions. But many non-techies know it, too. Each time you search for a text file *.txt on your computer, you use the asterisk operator. But how does it work? This article is all about the asterisk * quantifier in Python’s re library. Study it carefully and master … Read more

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 … Read more

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 … Read more

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’ … Read more