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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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