Metadata-Version: 2.1
Name: regexplain
Version: 0.1.0a14
Summary: Build and explain Python Regex patterns in a human-friendly way
Keywords: regex
Author-Email: "Aalap Shah (aka fishfin)" <shah.aalap@gmail.com>
License: MIT License
         
         Copyright (c) 2025 Aalap Shah
         
         Permission is hereby granted, free of charge, to any person obtaining a copy
         of this software and associated documentation files (the "Software"), to deal
         in the Software without restriction, including without limitation the rights
         to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
         copies of the Software, and to permit persons to whom the Software is
         furnished to do so, subject to the following conditions:
         
         The above copyright notice and this permission notice shall be included in all
         copies or substantial portions of the Software.
         
         THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
         IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
         FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
         AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
         LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
         OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
         SOFTWARE.
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development
Classifier: Topic :: Utilities
Project-URL: Homepage, https://gitlab.com/shah-aalap/regexplain
Requires-Python: >=3.10
Description-Content-Type: text/x-rst

.. |package-name| replace:: regexplain

.. |pypi-version| image:: https://img.shields.io/pypi/v/regexplain?label=PyPI%20Version&color=4BC51D
   :alt: PyPI Version
   :target: https://pypi.org/projects/regexplain/

.. |pypi-downloads| image:: https://img.shields.io/pypi/dm/regexplain?label=PyPI%20Downloads&color=037585
   :alt: PyPI Downloads
   :target: https://pypi.org/projects/regexplain/

regexplain
##########

|pypi-version| |pypi-downloads|

Description
***********

Provides Classes to build Python Regex in a more natural way, as well as given an Regex string, deconstruct it and explain in plain English.

This is a development version, and while it has been thoroughly tested, it will be battle-tested in a live project and updated as needed.

.. code-block:: python

   from regexplain import RegexTokenizer


   reg = RegexTokenizer(r"[^\w\s-]")
   reg.explain()

   # Explaining Full Pattern: [^\w\s-]
   # ┌──
   # │   [Span, Length] (0, 8), 8
   # │   [Flags] re.NOFLAG
   # │  ┌──
   # │──│ [^
   # │  │   [@0:Character Set] Matches any character not in the set
   # │  │   [Span, Length] (0, 8), 8
   # │  │   [Flags] re.NOFLAG
   # │  │  ┌──
   # │  │──│ \w
   # │  │  │   [@1:Character Class:Word] Matches any word character (alphanumeric and underscore)
   # │  │  │   [Span, Length] (2, 4), 2
   # │  │  │   [Flags] re.NOFLAG
   # │  │  └──
   # │  │  ┌──
   # │  │──│ \s
   # │  │  │   [@2:Character Class:Whitespace] Matches any whitespace character (space, tab, line-break)
   # │  │  │   [Span, Length] (4, 6), 2
   # │  │  │   [Flags] re.NOFLAG
   # │  │  └──
   # │  │  ┌──
   # │  │──│ -
   # │  │  │   [@3:Literal] Matches a single character from the list '-' (case-sensitive)
   # │  │  │   [Span, Length] (6, 7), 1
   # │  │  │   [Flags] re.NOFLAG
   # │  │  └──
   # │  │ ]
   # │  │   [@0:End] Token closed
   # │  └──
   # └──
   #