Skip to main content

Human Readable Regular Expression

Project description

myre

Another Way To Write Regular Expression.

About

myre is a Python library that provides a way for human to create and use regular expressions.

Installation

pip install myre

Basic Concept

Currently, there are two class to use, MatchAny and MatchALL.

Each pattern support four operation: & | ^ -.

For example, we have two patterns, patternA and patternB,

  • patternA | patternB means we can match patternA or patternB
  • patternA & patternB means we must match patternA and patternB both
  • patternA ^ patternB means we can match patternA but not patternB
  • patternA - patternB means after using patternB to trim the origin string then we can match patternA

Usage

  • MatchAny is used to match any of multiple patterns

  • MatchALL is used to match all of multiple patterns, if order is true, it will match these patterns in order

The detail could be found in tests/test_pattern

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

myre-0.0.7.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

myre-0.0.7-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file myre-0.0.7.tar.gz.

File metadata

  • Download URL: myre-0.0.7.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.8.18 Linux/6.5.0-1018-azure

File hashes

Hashes for myre-0.0.7.tar.gz
Algorithm Hash digest
SHA256 8a1e6331ea58dd2642630c75a4fe19ef4ce4decfd747fb85264a81dede9572fb
MD5 babc297d6aa3f5ab21ee53dd37dc518f
BLAKE2b-256 b8de037090f62df974cc7fc2cf7ad084b2d3a806e9c0fdf9454b4a59b50e4b5d

See more details on using hashes here.

File details

Details for the file myre-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: myre-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.8.18 Linux/6.5.0-1018-azure

File hashes

Hashes for myre-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 b2b8e229338b9eb88e490730c06b7e604ce5b0a4e56d73597f9bc1f6170dc0b5
MD5 ba132ba37332a7e36e91a1508764823c
BLAKE2b-256 beba476d06d66279b764ab9cb90b5040d1ae11dc192cc66cfd1599a7bb393bd9

See more details on using hashes here.

Supported by

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