Skip to main content

A multilingual regex library for Python (Turkish, English, German, French, and more)

Project description

RevoRegex

RevoRegex is a professional, multilingual regex validation library for Python. It supports Turkish, English, German, and French out of the box, and is easily extendable to more languages and validation types. Patterns and error messages are fully modular and loaded from JSON, making it ideal for international projects and scalable applications.

Features

  • Multilingual regex validation (TR, EN, DE, FR)
  • Language-specific error messages
  • Advanced validation: IBAN (mod-97), credit card (Luhn), IP (range check)
  • Easily extensible: add new languages or patterns via JSON
  • Modular, maintainable, and production-ready
  • Comprehensive test suite

Installation

pip install revoregex

Usage

from revoregex import RegexMatcher

# Turkish example
matcher = RegexMatcher(language='tr')
valid, msg = matcher.validate_with_message('email', 'test@example.com')
print(valid, msg)  # True, None

# English example
matcher = RegexMatcher(language='en')
valid, msg = matcher.validate_with_message('phone', '+11234567890')
print(valid, msg)  # True, None

# German example
matcher = RegexMatcher(language='de')
valid, msg = matcher.validate_with_message('iban', 'DE89370400440532013000')
print(valid, msg)

# French example
matcher = RegexMatcher(language='fr')
valid, msg = matcher.validate_with_message('téléphone', '+33612345678')
print(valid, msg)

Supported Validations

  • Email, phone, IBAN, credit card, IP, domain, hex color, date, username, password, plate, postal code, JSON, HTML tag, UUID, MAC address, and more.

Supported Languages

  • Turkish (tr)
  • English (en)
  • German (de)
  • French (fr)

Extending

Add new languages or patterns by editing the language-regex.json and error-messages.json files. No code changes required.

License

MIT


PyPI Keywords: regex, validation, multilingual, internationalization, i18n, Turkish, English, German, French, IBAN, credit card, phone, email, domain, python, luhn, mod97, json, html, uuid, mac address, plate, password, username, open source, PyPI, form validation, data validation

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

revoregex-0.1.0.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

revoregex-0.1.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file revoregex-0.1.0.tar.gz.

File metadata

  • Download URL: revoregex-0.1.0.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for revoregex-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b1809782fbf36fda41fc297eadfabff88513f644407b9ae38d22c09649910252
MD5 2ad940c8e5be75151b5cabd142cea73d
BLAKE2b-256 67f62adfd5370000ce7a4ed4b1761f48cdd3b0befedab6289cce1666abf4573a

See more details on using hashes here.

File details

Details for the file revoregex-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: revoregex-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for revoregex-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 33e5f5622bd35f84e4638eab6c766d22146f24358d6406e79e44032f6d6e5c87
MD5 52f1a8764c4a08b221c006a33357e81f
BLAKE2b-256 1a4fb2709b6bf667c3d977f5c61d3307ded6c690b5a78f96827d90bebd6b17e0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page