uri-templates/uritemplate-py — pull request #13 by deontologician (2014-04-01 17:14:52+00:00)
Title: Initial work on a regex implementation.

This is a work in progress attempting to implement issue #12

Currently, I have it passing 172 tests, with 182 failing. It involves a bit of hackery because the tests don't have quite what's needed to test a regex implementation. URI Templates also aren't quite bijective with some ambiguous cases like:

```
'{varA,varB,varC}'
```
If we get a string like 'a,b,c' we have the following possible ways to match against the uritemplate:
```
varA, varB, varC = 'a,b,c', None, None
varA, varB, varC = 'a,b', 'c', None
varA, varB, varC = 'a', 'b', 'c'
varA, varB, varC = None, 'a,b,c', None
varA, varB, varC = None, 'a,b', 'c'
varA, varB, varC = None, 'a', 'b,c'
varA, varB, varC = None, None, 'a,b,c'
```
Some of these are more reasonable answers than others, but the fact remains that if you feel these into the expand function, they'll result in the same output. So some sort of rule has to be made to disambiguate in these cases if a regex matcher is going to be complete.