Skip to content

Commit

Permalink
Add inline regex information to README
Browse files Browse the repository at this point in the history
  • Loading branch information
weavejester committed Dec 4, 2014
1 parent 9a1bed9 commit 52a0724
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Expand Up @@ -117,6 +117,17 @@ for different keywords. This allows more specific routing:
=> nil
```

You can also specify regular expressions inline in braces after the
keyword:

```clj
(def user-route
(clout/route-compile "/user/:id{\\d+}"))
```

Note that regular expression escape sequences (like `\d`) need to be
double-escaped when placed inline in a string.

## License

Copyright © 2014 James Reeves
Expand Down

0 comments on commit 52a0724

Please sign in to comment.