Skip to main content

No project description provided

Project description

Expressive Regex

PyPI - License PyPI - License Codecov

This project was made with inspiration from Super Expressive for JavaScript.

Expressive Regex allow you to build regular expressions in almost natural language and without external dependency.

Documentation

Example to match a telephone number that can be in the format 555-555-555, 555 555 555 or 555555555.

ExpressiveRegex()\
    .exactly(2).group\
        .oneOrMore.digit\
        .optional.setOfLiterals\
            .char('-')\
            .whitespaceChar\
        .end()\
    .end()\
    .oneOrMore.digit\
.toRegexString()
"(?:\d+[\-\s]?){2}\d+"

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

expressive_regex-0.4.5.tar.gz (6.6 kB view hashes)

Uploaded Source

Built Distribution

expressive_regex-0.4.5-py3-none-any.whl (7.5 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