cypreess/python-rex — pull request #3 by jaredks (2013-08-28 18:26:57+00:00)
Title: RexMatch object for last regex evaluated + other small fixes

Since the syntax is borrowed from Perl's it would seem appropriate to have some way to reference the capturing groups of the last regex evaluated. Currently `rex` needs to save the `RexMatch` object in a variable to allow access to its captured groups.

In Perl you can just do,

```perl
if ("Your ticket number: XyZ-1047. Have fun!" =~ /[a-z]{3}-(\d{4})/i){
print $1;
}
```

I added similar functionality,

```python
from rex import rex
if "Your ticket number: XyZ-1047. Have fun!" == rex("/[a-z]{3}-(\d{4})/i"):
print rex.group[1]
```

`group` is an attribute of `rex` function object but can just as easily be global if you prefer. I only choose this way because it seemed like you were encouraging `from rex import rex` style import.

Also fixed PEP8 spacing issues, removed unused import, and cleaned up `RexMatch` updating.