Skip to main content

A powerful regex utility library for validation, extraction, conversion, and formatting

Project description

rexa

rexa is a lightweight and modular Python library for regular expression (regex) utilities, offering easy-to-use tools for validation, extraction, conversion, and formatting. Designed for developers who need powerful yet readable regex functionalities, rexa keeps your code clean and your logic centralized.


✨ Features

  • Validate common patterns: email, phone number, IP address, date, etc.
  • Extract specific data from unstructured text.
  • Convert between different formats (dates, numbers, text).
  • Format and normalize messy strings.
  • Fully modular and extensible design.
  • Written in modern Python with object-oriented architecture.
  • Fully tested with pytest.

🚀 Quick Start

Installation

pip install rexa

Alternatively, if you're cloning manually:

git clone https://github.com/your-username/rexa.git
cd rexa
pip install .

📚 Usage

from rexa import Rex

rex = Rex()

# Validation
rex.Is_Email("user@example.com")           # True
rex.Is_Date("2025-08-02")                  # True

# Extraction
rex.Extract_Emails("Contact: a@b.com, c@d.com")
# ['a@b.com', 'c@d.com']

# Conversion
rex.Convert_DateFormat("02.08.2025", from_sep=".", to_sep="/")
# '02/08/2025'

# Formatting
rex.Slugify("Hello, World!")
# 'hello-world'

🗂️ Modules

  • validation.py: Input pattern validation functions
  • extraction.py: Email, phone, and pattern extraction
  • conversion.py: Format transformations for text and numbers
  • formatting.py: Text normalization and cleanup

✅ Tests

All functions are fully tested with pytest. To run tests:

pytest -q

🌐 Compatibility

  • Python 3.7+
  • No external dependencies (only standard library and re module)

🛍️ Feedback & Contributions

Issues, suggestions, and pull requests are welcome!

Start using rexa today to supercharge your regex workflows with elegant and maintainable Python code.

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

rexa-0.1.1.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

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

rexa-0.1.1-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file rexa-0.1.1.tar.gz.

File metadata

  • Download URL: rexa-0.1.1.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.0

File hashes

Hashes for rexa-0.1.1.tar.gz
Algorithm Hash digest
SHA256 aa12145fdd7bac25366d886e083641698193ccf545958b96d6a280dc1dfc7447
MD5 33ffa23eec076a0268677ee19c41bc03
BLAKE2b-256 3e5ba2434a025a8f044b87f5602638e0a886e0ac85f73291d95d8de62fec3bd8

See more details on using hashes here.

File details

Details for the file rexa-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: rexa-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.0

File hashes

Hashes for rexa-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3d6114a009ff95445275ab1d3cd1cbf0d77157e5866d63239a3697202d7dfc4f
MD5 ce271d90b10f3899dc8ef5290f3c3049
BLAKE2b-256 7b98a4bf78bfaff7961d0364fd64ae312a0695694180e15a5653f13f5d151368

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