🌐
Python documentation
docs.python.org β€Ί 3 β€Ί library β€Ί re.html
re β€” Regular expression operations β€” Python 3.14.7 documentation
Source code: Lib/re/ This module provides regular expression matching operations similar to those found in Perl. Both patterns and strings to be searched can be Unicode strings ( str) as well as 8-...
🌐
Python documentation
docs.python.org β€Ί 3 β€Ί howto β€Ί regex.html
Regular expression HOWTO β€” Python 3.14.7 documentation
This document is an introductory tutorial to using regular expressions in Python with the re module. It provides a gentler introduction than the corresponding section in the Library Reference.
🌐
W3Schools
w3schools.com β€Ί python β€Ί python_regex.asp
Python RegEx
RegEx can be used to check if a string contains the specified search pattern. Python has a built-in package called re, which can be used to work with Regular Expressions.
🌐
MicroPython
docs.micropython.org β€Ί en β€Ί latest β€Ί library β€Ί re.html
re – simple regular expressions β€” MicroPython latest documentation
Due to this, it’s not recommended to use raw Python strings (r"") for regular expressions. For example, r"\r\n" when used as the regular expression is equivalent to "rn". To match CR character followed by LF, use "\r\n". ... import re # As re doesn't support escapes itself, use of r"" strings is not # recommended. regex = re.compile("[\r\n]") regex.split("line1\rline2\nline3\r\n") # Result: # ['line1', 'line2', 'line3', '', '']
🌐
Google
developers.google.com β€Ί google for education β€Ί python β€Ί python regular expressions
Python Regular Expressions | Python Education | Google for Developers
Regular expressions are a powerful language for matching text patterns. This page gives a basic introduction to regular expressions themselves sufficient for our Python exercises and shows how regular expressions work in Python.
🌐
GeeksforGeeks
geeksforgeeks.org β€Ί python β€Ί regular-expression-python-examples
Python RegEx - GeeksforGeeks
August 14, 2025 - A Regular Expression or RegEx is a special sequence of characters that uses a search pattern to find a string or set of strings. It can detect the presence or absence of a text by matching it with a particular pattern and also can split a pattern ...
🌐
Real Python
realpython.com β€Ί regex-python
Regular Expressions: Regexes in Python (Part 1) – Real Python
May 21, 2026 - In previous tutorials in this series, you've seen several different ways to compare string values with direct character-by-character comparison. In this tutorial, you'll learn how to perform more complex string pattern matching using regular expressions, or regexes, in Python.
🌐
Programiz
programiz.com β€Ί python-programming β€Ί regex
Python RegEx (With Examples)
In this tutorial, you will learn about regular expressions (RegEx), and use Python's re module to work with RegEx (with the help of examples).
🌐
Medium
medium.com β€Ί @ebojacky β€Ί the-very-bare-minimum-essentials-for-regular-expressions-in-python-54e78c10b649
The Very Bare Minimum Essentials for Regular Expressions in Python | by Ebo Jackson | Medium
June 2, 2025 - Regex101: An interactive online tool for testing and debugging regex patterns with real-time feedback. Python’s re Documentation: The official documentation (docs.python.org/3/library/re.html) provides detailed explanations and examples.
Find elsewhere
🌐
Python
docs.python.org β€Ί 3.4 β€Ί library β€Ί re.html
6.2. re β€” Regular expression operations β€” Python 3.4.10 documentation
June 16, 2019 - It is important to note that most regular expression operations are available as module-level functions and methods on compiled regular expressions. The functions are shortcuts that don’t require you to compile a regex object first, but miss some fine-tuning parameters.
🌐
Rexegg
rexegg.com β€Ί regex-python.php
Python Regex Tutorial
Python Regex Tutorial. Discusses the Python re and regex classes, provides working code for matching, replacing and splitting.
🌐
Python Module of the Week
pymotw.com β€Ί 2 β€Ί re
re – Regular Expressions - Python Module of the Week
import re text = 'This is some text -- with punctuation.' pattern = r'(?i)\bT\w+' regex = re.compile(pattern) print 'Text :', text print 'Pattern :', pattern print 'Matches :', regex.findall(text) Because the options control the way the entire expression is evaluated or parsed, they should always come at the beginning of the expression. $ python re_flags_embedded.py Text : This is some text -- with punctuation.
🌐
PyPI
pypi.org β€Ί project β€Ί regex
regex Β· PyPI
In the regex (\s+)(?|(?P<foo>[A-Z]+)|(\w+) (?P<foo>[0-9]+) there are 2 groups: ... If you want to prevent (\w+) from being group 2, you need to name it (different name, different group number). The issue numbers relate to the Python bug tracker, except where listed otherwise.
🌐
Dataquest
dataquest.io β€Ί home β€Ί cheat sheets β€Ί python regex cheat sheet
Python Regex Cheat Sheet
July 22, 2025 - Download our Python regular expressions cheat sheet for syntax, character classes, groups, and re module functionsβ€”ideal for pattern matching.
🌐
Tutorialspoint
tutorialspoint.com β€Ί python β€Ί python_reg_expressions.htm
Python - Regular Expressions
A regular expression is a special sequence of characters that helps you match or find other strings or sets of strings, using a specialized syntax held in a pattern. Regular expression are popularly known as regex or regexp.
🌐
Medium
medium.com β€Ί @AlexanderObregon β€Ί getting-started-with-regex-in-python-173972a40584
Getting Started with Regex in Python | Medium
November 14, 2024 - Learn how to use regex in Python with the re module. Validate input, search text, and perform replacements easily using practical examples.
🌐
Readthedocs
pyformlang.readthedocs.io β€Ί en β€Ί latest β€Ί modules β€Ί regular_expression.html
Regular Expression β€” pyformlang 0.1.3 documentation
For a representation closer to Python one, please use PythonRegex Β· The concatenation can be represented either by a space or a dot β€˜.’ Β· The union is represented either by β€˜|’ or β€˜+’ ... It is also possible to use parentheses. All symbols except the space, β€˜.’, β€˜|’, β€˜+’, β€˜*’, β€˜(’, β€˜)’, β€˜epsilon’ and β€˜$’ can be part of the alphabet. All other common regex operators (such as []) are syntactic sugar that can be reduced to the previous operators.
🌐
Python for Everybody
py4e.com β€Ί html3 β€Ί 11-regex
PY4E - Python for Everybody
It is possible to tell an asterisk ... your regex will match the very first instance rather than the last instance. In the example above, using .+?@ would instead match the first at-sign, the one in [email protected]. For more details, see the Python documentation on greedy ...