Skip to main content

📦 regexto-validators (Python)

Curated, production-ready, and battle-tested regex patterns for Python, backed by the regex.to pattern registry.

All patterns are open-source, fully tested, and visualized live on regex.to.

npm pypi crates.io packagist pkg.go.dev Tested & Visualized Live


Why regexto-validators?

  • 🔍 Tested and Visualized Live: Every single pattern in this library can be searched, tested, and visualized interactively at regex.to.
  • 🚀 Zero Dependencies: Pure Python validation. Lightweight and lightning-fast.
  • 📁 JSON Single Source of Truth: Patterns are declared declaratively in standard JSON files shared across multiple languages.

Installation

pip install regexto-validators

Quick Start

1. Basic Validation (Python)

from regexto_validators import validate, test

# 1. Quick boolean test (substring match)
test('email', 'contact me at user@example.com')   # → True
test('email', 'invalid-email')                      # → False

# 2. Strict full-string validation
is_valid = validate('ipv4', '192.168.1.1')          # → True

2. Smart Type Auto-Detection

Pass an unknown string, and the validator will identify matching formats:

from regexto_validators import detect

matches = detect('0x742d35Cc6634C0532925a3b844Bc454e4438f44e')
# → [{'pattern': {'slug': 'ethereum-address', ...}, 'matchType': 'full', 'coverage': 1.0}]

Available Patterns

Here is a curated subset of the 79+ patterns supported. View all of them and test them live at regex.to/patterns:

Slug Name Category Live Sandbox
email Email Address Internet Test Live ↗
url URL (HTTP/HTTPS) Internet Test Live ↗
ipv4 IPv4 Address Network Test Live ↗
ipv6 IPv6 Address Network Test Live ↗
hex-color Hex Color Design Test Live ↗
semver Semantic Version Dev Test Live ↗
uuid UUID Dev Test Live ↗
credit-card Credit Card Number Finance Test Live ↗
iban IBAN Finance Test Live ↗
pl-nip Polish NIP (Tax ID) Finance Test Live ↗

License

MIT

Metadata

Release files for regexto-validators 1.0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for regexto-validators 1.0.8
File Size Uploaded Provenance Actions
regexto_validators-1.0.8.tar.gz 31.1 kB Without provenance Details for regexto_validators-1.0.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for regexto-validators 1.0.8
File Interpreter ABI Platform Actions
regexto_validators-1.0.8-py3-none-any.whl Python 3 none any Details for regexto_validators-1.0.8-py3-none-any.whl

Total release size: 104.3 kB

Release files / regexto_validators-1.0.8.tar.gz

Download URL regexto_validators-1.0.8.tar.gz
Size 31.1 kB
Tags Source
SHA-256 checksum
How to use checksums
bfb29971753cd0417394bbec91f797eed722ecd1995d90770e88e57510e446cb
BLAKE2b-256 checksum
How to use checksums
5f99a67d30aaa4be12ed428467948e54d9123d56cec5e233d2aaa6b7a03333c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / regexto_validators-1.0.8-py3-none-any.whl

Download URL regexto_validators-1.0.8-py3-none-any.whl
Size 73.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f2f1808b971bd2cdbe05f5561d935d2c7817fae2dfa671592e70958d01263895
BLAKE2b-256 checksum
How to use checksums
8cf050ea59861a57b111a82d8d6992eb0c888efa0250cc36cfb2bb777096391f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for regexto-validators 1.0.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page