skillfed

regex

Alternative regular expression module, to replace re.

regex Permissive license Apache-2.0 AND CNRI-Python Active 594 v2026.7.19 released

Install

regex on PyPI

pip

pip install regex

uv

uv add regex

poetry

poetry add regex

Package facts

License Apache-2.0 AND CNRI-Python (permissive)
Python support supports the current Python release (>=3.10)
Install friction medium — platform-specific wheel
Runtime dependencies none
Maintenance actively maintained — 25 days since the last release
Last repo commit
First released
Popularity one of the 100 most-downloaded packages on PyPI (30-day window, as of 2026-08-13)
Known vulnerabilities none known (OSV.dev, checked 2026-08-13)

Evidence: regex-2026.7.19-cp310-cp310-macosx_10_9_universal2.whl; regex-2026.7.19-cp310-cp310-macosx_10_9_x86_64.whl; regex-2026.7.19-cp310-cp310-macosx_11_0_arm64.whl; regex-2026.7.19-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; regex-2026.7.19-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl; regex-2026.7.19-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl; regex-2026.7.19-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; regex-2026.7.19-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; regex-2026.7.19-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl; regex-2026.7.19-cp310-cp310-musllinux_1_2_aarch64.whl; regex-2026.7.19-cp310-cp310-musllinux_1_2_ppc64le.whl; regex-2026.7.19-cp310-cp310-musllinux_1_2_riscv64.whl; regex-2026.7.19-cp310-cp310-musllinux_1_2_s390x.whl; regex-2026.7.19-cp310-cp310-musllinux_1_2_x86_64.whl; regex-2026.7.19-cp310-cp310-win32.whl; regex-2026.7.19-cp310-cp310-win_amd64.whl; regex-2026.7.19-cp310-cp310-win_arm64.whl; regex-2026.7.19-cp311-cp311-macosx_10_9_universal2.whl; regex-2026.7.19-cp311-cp311-macosx_10_9_x86_64.whl; regex-2026.7.19-cp311-cp311-macosx_11_0_arm64.whl

Development Status :: 5 - Production/StableIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Scientific/Engineering :: Information AnalysisTopic :: Software Development :: Libraries :: Python ModulesTopic :: Text ProcessingTopic :: Text Processing :: General

About regex

from the package's own PyPI description — quoted content, verbatim

Introduction

This regex implementation is backwards-compatible with the standard 're' module, but offers additional functionality.

Python 2

Python 2 is no longer supported. The last release that supported Python 2 was 2021.11.10.

PyPy

This module is targeted at CPython. It expects that all codepoints are the same width, so it won't behave properly with PyPy outside U+0000..U+007F because PyPy stores strings as UTF-8.

Multithreading

The regex module releases the GIL during matching on instances of the built-in (immutable) string classes, enabling other Python threads to run concurrently. It is also possible to force the regex module to release the GIL during matching by calling the matching methods with the keyword argument concurrent=True. The behaviour is undefined if the string changes during matching, so use it only when it is guaranteed that that won't happen.

Unicode

This module supports Unicode 17.0.0. Full Unicode case-folding is supported.

Flags

There are 2 kinds of flag: scoped and global. Scoped flags can apply to only part of a pattern and can be turned on or off; global flags apply to the...

Read as markdown · JSON record · Source repository · Homepage

AI interpretation — verify before relying

AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page

A drop-in replacement for Python's standard `re` module that adds Unicode 17.0.0 support, nested set operations, fuzzy matching, and advanced pattern features while maintaining backwards compatibility.

Medium install friction due to compiled wheels across many platforms (cp310, cp311+, multiple architectures). Actively maintained with recent release (25 days ago) and 594 repository stars. Supports Python 3.10+.

Dual-licensed under Apache-2.0 and CNRI-Python (permissive). Both licenses allow commercial and private use with minimal restrictions, making it suitable for most projects.

Usage

import regex

# Basic usage compatible with re module
match = regex.search(r'\d+', 'abc123def')
if match:
    print(match.group())  # Output: 123

# Advanced: nested sets (VERSION1 behavior)
match = regex.search(r'[[a-z]--[aeiou]]', 'bcdfg')
print(match.group() if match else 'No match')

Requires Python 3.10 or later. Compiled extension module; installation may require a C compiler on platforms without pre-built wheels.

Verdict: A well-maintained, actively developed regex engine for Python 3.10+ that extends the standard library with Unicode 17.0.0, nested sets, and fuzzy matching while remaining backwards-compatible. No known vulnerabilities, permissive dual licensing, and top-100 PyPI popularity make it a solid choice for projects needing advanced pattern matching beyond the standard `re` module.

Needs verification

  • Whether the GIL-release behavior during matching (mentioned in description) provides measurable performance benefits for typical workloads
  • Compatibility and performance implications of the fuzzy matching modes (BESTMATCH, ENHANCEMATCH) for production use cases
  • Whether the medium install friction (compiled wheels) translates to meaningful deployment delays in CI/CD pipelines
regex pattern matching unicodere module replacementadvanced regular expressions pythonfuzzy regex matchingnested character sets regexposix regex matchingunicode case folding regex

Similar packages