Metadata-Version: 2.1
Name: simpex
Version: 1.0.1
Summary: simpex is a Python library that simplifies the process of using regular expressions (regex).
Author: s41r4j
Maintainer: s41r4j
License: MIT License
        
        Copyright (c) 2023 S41R4J
        
        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.
Project-URL: Homepage, https://github.com/s41r4j/simpex
Project-URL: Wiki, https://github.com/s41r4j/simpex/wiki
Project-URL: Bug Tracker, https://github.com/s41r4j/simpex/issues
Keywords: python,regex,simpex,regular-expressions,s41r4j
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 5 - Production/Stable
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests

# Simpex

> 'simpex' stands for 'simple regex'

- Simplifies the process of using regex in python

<br>

## Usage:

> Installation: `pip install simpex`

#### Custom:

- Given a sample data set with minimum 2 values, it will return a regex pattern
- Example:

```
import simpex

data_set = ['example@gmail.com',
            'test@yahoo.com',
            'admin@proton.me']

pattern = simpex(data_set)
```

#### Built-in:

- Use built-in methods to get regex pattern
- Check all available built-in methods in [wiki]()
- temp wiki:

```
patterns(pattern_name)
- pattern_name: str
- returns: regex pattern
- avaliable: `email`, `phone`, `url`, `ipv4`, `ipv6`, `mac`, `credit_card`, `date`, `hex_color`, `html_tag`
```

- Example:

```
import simpex

pattern = simpex.patterns('email')
```

<br>

> Custom / Built-in method will return the following pattern: `^[a-zA-Z0-9]+@[a-zA-Z0-9]+\.[a-zA-Z0-9]*`

```
<br>
```

### API used

> all require string type data

| sr. | API url                                    | required data type          | outputs         |
| --- | ------------------------------------------ | --------------------------- | --------------- |
| 0   | information (this only)                    | none / null                 | this info - str |
| 1   | https://saasbase.dev/tools/regex-generator | english to regex (ai) - str | single - str   |
| 2   | https://www.autoregex.xyz                  | english to regex (ai) - str | single - str    |
| 3   | https://regex.murfasa.com                  | english to regex (ai) - str | single - str    |
| 4   | https://regex.ai                           | multiple data set           | multiple - list |
