Metadata-Version: 2.1
Name: pregex
Version: 0.3.2
Summary: Regex with structural pattern matching
Home-page: https://github.com/Hieuzest/pregex
License: MIT
Keywords: regex,pattern,match
Author: Hieuzest
Author-email: girkirin@hotmail.com
Requires-Python: >=3.7,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Project-URL: Repository, https://github.com/Hieuzest/pregex
Description-Content-Type: text/markdown

# pregex

## Usage

```python
from pregex import *
pattern = Pattern(["The code is:", Kleene([Require(Raw("[0-9]+"), name="code", post=int), Optional(",")])])
message = "The code is: 123456, 3456"
res = match_rawstring(pattern, message, RegexFlag.SPLIT)
res.group("code")
```

