simplify the creation of regular expressions using a fluent interface
Project description
simplify the creation of regular expressions using a fluent interface
Overview
RegexKit is a Python library that simplifies the creation of regular expressions using a fluent interface. It provides an intuitive way to construct complex regex patterns without manually writing raw regular expressions.
Installation
Note: for now the package has not been uploaded to pypi
Ensure you have Python installed, then import the RegexKit module into your project.
Purpose
The main purpose of this library is to make writing regex more fun and easier to understand. Regex in general is really hard to understand just by looking at it at least for me 😅 this just makes it easier to read and write regex
Example Usage:
Pattern Example:
from regexkit import Patterns
email_regex = Patterns.email()
print(bool(email_regex.match("test@example.com"))) # Output: True
RegexKit Example:
from regexkit import RegexKit
pattern = RegexKit().literal("http").literal("s").optional().literal("://").compile()
print(bool(pattern.match("https://"))) # Output: True
print(bool(pattern.match("http://"))) # Output: True
Docs
For further information regarding the lib head over to the docs folder You will find a detailed analysis of the library and how to use it properly over there
Contribution
Found an issue in the lib or do you just want to contribute head over to the issues and create and issue. Every small help is appreciated.
Made with ♥️ by yours truly.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file regexkit-0.1.tar.gz.
File metadata
- Download URL: regexkit-0.1.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07a6ba6330fdce9681b83b85da53f8a686d388440bfbaedb3d29a942976ad2c3
|
|
| MD5 |
b25d7a528c1202591663db49097b6090
|
|
| BLAKE2b-256 |
aa9f882fd5e3b34137eceac40f976fd7c079cf4591ac2d018d1403e463a4ba6b
|
File details
Details for the file regexkit-0.1-py3-none-any.whl.
File metadata
- Download URL: regexkit-0.1-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b5bf1cbe47f5ff049f16a693eab9819f01191fba8908110fd86b024868394e04
|
|
| MD5 |
2b1a6ab58c7c36b025093ce24127febe
|
|
| BLAKE2b-256 |
b06b009c5c14269cba6b3195ae23cd926dea6dda68dd798de496a4a3fd1ab527
|