You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

regexkit

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

regexkit

simplify the creation of regular expressions using a fluent interface

0.1
pipPyPI
Maintainers
1

alt text

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.

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