Search the regex that fits all querying strings.
-
Dozens of pre-written regexes are indexed and organized as a partial order, available in
regexorder/templates.json. -
The regex of all the querying strings' least upper bound in the partial order is returned.
-
templates.svgplots the partial order.
The core part is the pre-written regexes and their respective structure. Currently they only cover the most common cases.
- Any idea or contribution is highly welcome.
Reference
This library is part of the implementation for our research paper to be submitted.
Installation
This package is available on PyPI. Just use pip3 install -U RegexOrder to install it.
Our regexes utilize some advanced Unicode features, that are not available in standard re library yet. Thus, the more advanced regex library must be used to match our regexes.
Examples
from regexorder import RegexOrder
r = RegexOrder()
t = r.match("123")
t.name
# 'pos_int'
t.regex
# '\\+?\\d+'
t = r.matchall(["apple", "banana", "cheese cake"])
t.name
# 'lower_words'
t.regex
# '\\p{Ll}+(\\s+\\p{Ll}+)*'
Metadata
Release files for RegexOrder 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| RegexOrder-0.2.tar.gz | 3.4 kB | Without provenance | Details |
Release files / RegexOrder-0.2.tar.gz
| Download URL | RegexOrder-0.2.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6f2b70cc42f6c31dba275a1c81287441752af6a9644d60364269e8fb8da98b59
|
|
BLAKE2b-256 checksum How to use checksums |
312eba45fe736713c4673e59ddb9f27f0f72cf83ff0bf2108b8f4b8df93df3d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for RegexOrder 0.2
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.