From 52a07248d14a960c66cba179e27d406bcdf2a54b Mon Sep 17 00:00:00 2001 From: James Reeves Date: Thu, 4 Dec 2014 10:22:22 +0000 Subject: [PATCH] Add inline regex information to README --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index f211f77..7a56990 100644 --- a/README.md +++ b/README.md @@ -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