Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

myre

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

myre

Human Readable Regular Expression

  • 0.0.7
  • PyPI
  • Socket score

Maintainers
1

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

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc