Skip to main content

Really, really easy regular expressions for python.

Project description

![Easy does it!](http://i.imgur.com/N7uilEZ.png)

# easy-expressions [![Build Status](https://travis-ci.org/Miserlou/easy-expressions.svg)](https://travis-ci.org/Miserlou/easy-expressions)

The world's most gangsta regular expressions library.

It turns this..

```python

regex = re.compile(r'(?:(?:\$){1,1})(?:(?:(?:\d)){1,})(?:(?:\.){1,1})(?:\d)(?:\d)')
```

into this!

```python
from easy_expressions import Easy

regex = Easy
.find("$")
.min(1).digits()
.then(".")
.digit()
.digit()
.getRegex();

regex.findall("$10.00");
```

## About

_easy-expressions_ is a python regular expressions library with a 'python for humans' philsophy.

Currently in early alpha. More info soon.

## Installation

pip install easy-expressions

## Examples

```python
from easy_expressions import Easy

regex = Easy
.find("$")
.min(1).digits()
.then(".")
.digit()
.digit()
.getRegex();

regex.findall("$10.00");
```

## Inspiration

Regexes are hard when they should be easy.

I had this idea while watching Straight Outta Compton. Turns out [@thebinarysearchtree](https://github.com/thebinarysearchtree/) had already [implemented it in JS](https://github.com/thebinarysearchtree/regexpbuilderjs), so this is essentially a port of that.

## License

MIT, 2015.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

easy-expressions-0.1.0.tar.gz (4.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page