Skip to main content

Magic Regex

Read and write regular expressions easily.

import mrex

# Find
id_re = mrex.exactly("id: ").and_(mrex.DIGITS.group_as("id"))
id_str = id_re.find("id: 12345").group("id")
# id_str == "12345"

# Split
words = mrex.NON_CHARS.split("It's just a flesh wound...")
# words == ["It", "s", "just", "a", "flesh", "wound", ""]

Installation

pip install mrex

Development

  • Download source
  • Install development dependencies: flit install -s --deps develop
  • Format code: black .
  • Run tests: pytest
  • Bump version in src/mrex/__init__.py
  • Build package: flit build
  • Deploy: flit publish

Thanks

Project influenced by magic-regexp.

Metadata

Release files for mrex 0.0.4

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

Source distribution (sdist)

Source distribution for mrex 0.0.4
File Size Uploaded Provenance Actions
mrex-0.0.4.tar.gz 5.7 kB Without provenance Details for mrex-0.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mrex 0.0.4
File Interpreter ABI Platform Actions
mrex-0.0.4-py3-none-any.whl Python 3 none any Details for mrex-0.0.4-py3-none-any.whl

Total release size: 9.4 kB

Release files / mrex-0.0.4.tar.gz

Download URL mrex-0.0.4.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
1781339901a0b532f042e99f851ed8ee8d439045e316ca241ea8ecab53593d58
BLAKE2b-256 checksum
How to use checksums
370a6ac60185d4e3b42c935c087864bb41d696e225f2265054f833a637b3f847
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.28.2

Release files / mrex-0.0.4-py3-none-any.whl

Download URL mrex-0.0.4-py3-none-any.whl
Size 3.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2c448e0a23399685960b83cea4c7b90f1cb3d32afb508cbba46dd966d1ffcd57
BLAKE2b-256 checksum
How to use checksums
7a769f432316daa1b6c07078ab1508969292af55b877b83b70033fbf3e309908
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.28.2

Security for mrex 0.0.4

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