weavejester/clout — pull request #9 by ptaoussanis (2012-11-16 09:27:08+00:00)
Title: Add support for optional trailing slashes and subdomain matching

Okay, thought about this a little more and have cleaned up a new proposal here.

Dropped the inline-regex idea in favour of something simpler that covers the most common use-cases I had in mind. Specifically:

```clojure
"http://?example.com/" or "//?example.com/" ; Matches optional subdomain(s)
"http://www?example.com/" or "//www?example.com/" ; Matches optional www subdomain
"/foo/bar/?" ; Matches optional trailing slash
```

Implementation is pretty simple. Only potentially-sensitive thing I changed is the inclusion of `/`s to the literal regex: you may want to double-check that. Otherwise all old tests are passing, relevant new tests added. Short note added to README.