4 Turn an Express-style path string such as `/user/:name` into a regular expression.
9 var pathToRegexp = require('path-to-regexp');
11 ### pathToRegexp(path, keys, options)
13 - **path** A string in the express format, an array of such strings, or a regular expression
14 - **keys** An array to be populated with the keys present in the url. Once the function completes, this will be an array of strings.
16 - **options.sensitive** Defaults to false, set this to true to make routes case sensitive
17 - **options.strict** Defaults to false, set this to true to make the trailing slash matter.
18 - **options.end** Defaults to true, set this to false to only match the prefix of the URL.
22 var exp = pathToRegexp('/foo/:bar', keys);
24 //exp = /^\/foo\/(?:([^\/]+?))\/?$/i
29 You can see a live demo of this library in use at [express-route-tester](http://forbeslindesay.github.com/express-route-tester/).