Metadata-Version: 2.4
Name: repb
Version: 0.0.2
Summary: Provides a fluent API builder for regular expressions.
Author: bronskiy
Requires-Python: >=3.7
Description-Content-Type: text/markdown

# Regular Expression Pattern Builder (repb)

**repb** is python library that allows you to create regular expression patterns using a fluent API builder. This library requires python version **3.7 or higher**.

## Features

- Create regular expression patterns with a fluent API builder.
- Build regular expression patterns into strings.
- Compile regular expression patterns into the `Pattern` class.

## How to use

```python
import re
from repb import RegexBuilder, RegexCharset

result = (RegexBuilder() # builder
          .literal("#")
          .charset(RegexCharset() # charset
               .add_range("0", "9")
               .add_range("a", "f")
               .add_range("A", "Z"))
          .repeat(3) # quantifier
          .optional()
          .repeat(3)
          .build()) # returns the string value of the pattern

if re.fullmatch(result, "#FFFFFF"):
    print("YES")
else:
    print("NO")
```

## Main Classes & Types

The main classes are:

- **`RegexBuilder`**
- `RegexCharset`
- `RegexGroup`

The main types are:

- **`GroupType`**

## Licence

repb is released as an open source project under the [MIT Licence](https://opensource.org/license/mit).
