$npx skillfedfor your agent

real-regex

REAL — linear-time (ReDoS-safe) regex engine with an re-compatible API

With conditionsPyPI LibrariesReleased Aug 202688.1K downloads / moMITPlatform wheel

Decision gist · record as of 2026-08-14

platform wheels — real_regex-2026.8.15-cp310-abi3-macosx_10_9_x86_64.whl · real_regex-2026.8.15-cp310-abi3-macosx_11_0_arm64.whl · real_regex-2026.8.15-cp310-abi3-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
v2026.8.15 · released 2026-08-14 · Python >=3.10

Yes, if you need ReDoS-safe regex with predictable performance and can accept that the project is very new (first release 2026-06-13). The API is familiar, the license is permissive, and there are no known vulnerabilities. Install friction is medium due to compilation, but wheels cover common platforms. Verify production stability and real-world performance for your specific patterns before relying on it in critical systems.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python >= 3.10
  • Medium install friction due to compiled wheels for multiple platforms.
  • Active maintenance with release on 2026-08-14; the project is very new (first release 2026-06-13) and has low star count, so production stability is unproven.

License · maintenance · safety

MIT (permissive) — MIT license permits commercial and private use with minimal restrictions — standard permissive terms.

last release 2026-08-14 (0 days) · last repo commit 2026-08-14 · 2 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 88,057 downloads/mo, #13,751 on PyPI

Verify before relying

pip install real-regex

import real as re

m = re.match(r"(\w+)@(\w+)\.(\w+)", "user@example.com")
print(m.group(1), m.group(2), m.group(3))
  • Whether the linear-time guarantee holds for all real-world regex patterns developers actually use
  • Performance comparison details beyond the mention that it is faster on most work but slower on some cases
  • Maturity and stability of the C++20 engine in production environments
Same gist for agents: .md · .json

What it is and what it does

real-regex is a regex engine that replaces Python's standard `re` module with a linear-time implementation backed by a C++20 Thompson NFA simulator. It guarantees that every accepted pattern runs in linear time with no possibility of catastrophic backtracking (ReDoS), while retaining support for bounded lookarounds—a feature that competing linear engines drop to maintain safety. The API mirrors `re` exactly: `compile`, `search`, `match`, `fullmatch`, `findall`, `finditer`, `sub`, `subn`, `split`, and all standard match object methods work as expected.

The trade-off is strictness: patterns using backreferences, conditionals, or certain Unicode properties raise an error rather than falling back silently to backtracking. This is intentional—a compiled pattern is a safety guarantee. You can opt into fallback behavior per call or globally if needed, at the cost of losing the linear-time promise for those patterns. The engine ships as a compiled wheel with no runtime dependencies, and the same C++ library is available to C++ code via a header-only interface.

Use it for

  • Parsing untrusted user input or hostile regex patterns where ReDoS attacks are a concern
  • Text extraction and validation in security-sensitive applications where performance must be predictable
  • Large-scale log parsing or data processing where regex performance matters and backtracking blowup is unacceptable
  • Building tools that accept user-supplied patterns and need to guarantee they won't hang the system

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need ReDoS-safe regex with predictable performance and can accept that the project is very new (first release 2026-06-13).

The API is familiar, the license is permissive, and there are no known vulnerabilities. Install friction is medium due to compilation, but wheels cover common platforms. Verify production stability and real-world performance for your specific patterns before relying on it in critical systems.

Install

real-regex on PyPI

Before you install

Medium install friction due to compiled wheels for multiple platforms. Active maintenance with release on 2026-08-14; the project is very new (first release 2026-06-13) and has low star count, so production stability is unproven.

Requires Python >= 3.10

License in practice

MIT license permits commercial and private use with minimal restrictions — standard permissive terms.

Quickstart

pip install real-regex

import real as re

m = re.match(r"(\w+)@(\w+)\.(\w+)", "user@example.com")
print(m.group(1), m.group(2), m.group(3))

Verify before relying

  • Whether the linear-time guarantee holds for all real-world regex patterns developers actually use
  • Performance comparison details beyond the mention that it is faster on most work but slower on some cases
  • Maturity and stability of the C++20 engine in production environments

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.10
Install frictionMedium. Platform-specific wheel
Runtime dependenciesNone
MaintenanceActively maintained 0 days since the last release
Last repo commit
First released
Downloads88,057 / month, #13,751 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 4 - BetaIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: C++Programming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyTopic :: Software Development :: LibrariesTopic :: Text Processing

Evidence: real_regex-2026.8.15-cp310-abi3-macosx_10_9_x86_64.whl; real_regex-2026.8.15-cp310-abi3-macosx_11_0_arm64.whl; real_regex-2026.8.15-cp310-abi3-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; real_regex-2026.8.15-cp310-abi3-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; real_regex-2026.8.15-cp310-abi3-musllinux_1_2_aarch64.whl; real_regex-2026.8.15-cp310-abi3-musllinux_1_2_x86_64.whl; real_regex-2026.8.15-cp310-abi3-win32.whl; real_regex-2026.8.15-cp310-abi3-win_amd64.whl

Tags

Capabilities
redos-safe regex enginelinear-time pattern matchingre module replacementcatastrophic backtracking preventionbounded lookaround regexsafe regular expressionsthompson nfa regex
Topics
security-focusedperformance-predictable
PyPI keywords
regexregular-expressionredoslinear-timere

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “redos-safe regex engine”

  • real-regexA drop-in replacement for Python's `re` module that uses a…
  • onigurumacffiProvides Python bindings to the Oniguruma regex engine via CFFI,…
  • google-re2A drop-in replacement for Python's re module that uses Google's RE2…

Give your agent the search over MCP, or paste the wish link into any chat.

More Libraries packages

urllib3 Worth it
PyPI · Libraries · released May 2026

urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.

MITpure Python · 3.10+
1.8Bdownloads / mo
requests Worth it
PyPI · Libraries · released May 2026

Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.

Apache-2.0pure Python · 3.10+
1.8Bdownloads / mo
pluggy Worth it
PyPI · Libraries · released May 2025

Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.

Install it if you're building an extensible application or framework.

MITpure Python · 3.9+aging
1.3Bdownloads / mo
python-dateutil Worth it
PyPI · Libraries · released Mar 2024

Provides parsing, arithmetic, and recurrence rule computation for dates and times, with timezone support and iCalendar RFC compliance.

Install it if you need to parse flexible date strings, compute relative dates, handle timezones, or work with recurrence rules—it's the de facto choice for these tasks.

Apache-2.0pure Python
1.2Bdownloads / mo
six With conditions
PyPI · Libraries · released Dec 2024

Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.

MITpure Python
1.2Bdownloads / mo
pytest Worth it
PyPI · Libraries · released Jun 2026

pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.

MITpure Python · 3.10+
1.1Bdownloads / mo

See also google-re2 · regex · regexploit · onigurumacffi · flpc · first · backrefs · multiregex · regress · hyperscan