Registry / serialization / regex
library2026.7.19pypypi✓ verified 27d ago

An alternative regular expression module designed to replace Python's built-in 're' module, offering additional functionality. Current version: 2026.2.28. Release cadence: Regular updates.

pip install regex
INSTALL
IMPORT
SIG · REGEX
R
regex
serializationpythonv2026.7.19
Install
2.4s avg
Import
86ms
Disk
19MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2026.7.19 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.092s · 20.4MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.4s · import 0.080s · 21MB
19MB installed
● package 19MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

regex
import regex
Ensure correct import path to avoid 'ModuleNotFoundError'

Basic usage of the regex module to find all words in a text.

import regex pattern = r'\b\w+\b' text = 'Hello, world!' matches = regex.findall(pattern, text) print(matches)
Debug
Known issues
breakingThe regex module is incompatible with PyPy due to differing string storage methods.
fix
Use CPython for compatibility.
affects: All
gotchaThe regex module releases the GIL during matching, which can lead to concurrency issues if the string is modified during matching.
fix
Ensure the string remains unchanged during matching when using concurrent=True.
affects: All
Upgrade
Version history
2026.7.19latest on PyPI · released Jul 19, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
12 hits · last 30 days
node
10
Resources