Skip to main content

Contributors Forks Stargazers Issues MIT License LinkedIn


Logo

Regex Engine

An awesome package to generate regex Report Bug · Request Feature

Table of Contents

About The Project

Generating regex can sometimes be complicated. That is why we are introducing this package to help you get things done.

Supported functionalities :

  • Regex Generation for Numerical Range

What does each functionalities do?

1. Regex Generation for Numerical Range

Generate regex given a numerical range, So when given a new number between this range the regex will match.

Person who has motivated me to start this repository is listed in the acknowledgments.

Coded With Language

Getting Started

Simply install the package, import it in your python code and run the method needed. Look at the docstring or source code to understand what is happening.

Prerequisites

Python 3.6 or greater

Installation

pip install regex-engine

Usage

1. Regex Generation for Numerical Range

You get what you give : If given numbers are integers you get a regex that will only match with integer and if floating-point numbers are given it only match with floating-point number.

Supports integer and floating-point numbers. It can even be a negative range.

from regex_engine import generator
generate = generator()
regex1 = generate.numerical_range(5,89)
regex2 = generate.numerical_range(81.78,250.23)
regex3 = generate.numerical_range(-65,12)

Example regex generated for 25-53

^([3-4][0-9]|2[5-9]|5[0-3])$

The regex might not be optimal but it will surely serve the purpose.

The problem of checking a number is within a range might have been simple if you didn't choose the regex path.
if a <= your_input_number <=b would have simply solved the same problem.

We dedicate this method in the package to the people who are pursuing a different path or thinking out of the box.

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Raj Kiran P - @raj_kiran_p - rajkiranjp@gmail.com
GitHub : https://github.com/raj-kiran-p
Website : https://rajkiranp.com

Acknowledgements

Metadata

Release files for regex-engine 0.1.0

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

Source distribution (sdist)

Source distribution for regex-engine 0.1.0
File Size Uploaded Provenance Actions
regex_engine-0.1.0.tar.gz 6.5 kB Without provenance Details for regex_engine-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for regex-engine 0.1.0
File Interpreter ABI Platform Actions
regex_engine-0.1.0-py3-none-any.whl Python 3 none any Details for regex_engine-0.1.0-py3-none-any.whl

Total release size: 13.3 kB

Release files / regex_engine-0.1.0.tar.gz

Download URL regex_engine-0.1.0.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
1d37076d85c661a68ed4b212816f4173d57867506866824b7ad295c91c427f8a
BLAKE2b-256 checksum
How to use checksums
d0004ce92cf15f047d87c63d1e101526098fa79e8505c398cc0e0da8b5289b65
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8

Release files / regex_engine-0.1.0-py3-none-any.whl

Download URL regex_engine-0.1.0-py3-none-any.whl
Size 6.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d2f4bce23b84e8843eab863157e64980443fe345f056b270492c582f7fb6dd10
BLAKE2b-256 checksum
How to use checksums
f0007c4ad44950c9a0bd568cd97d558c650cae8ea8c21e7ba19fa0d0ea9aff77
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8

Security for regex-engine 0.1.0

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