Skip to content
Myr

Updated docs

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent b68473a · Browse files · 3 files+6 added−6 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+6 added−6 removed

  • other:+6 added−6 removed

3 files+6 added−6 removed

modified:docs/guide.1+2 added-2 removed
174 unmodified lines
175.176.IP "" 0177.178.P179Regular expression literals may also be passed for complex uses\. Since capture groups with literal \fIRegExp\fR\'s are anonymous we use the \fIparams\.captures\fR array\.179Regular expression literals may also be passed for complex uses\. Since capture groups with literal \fIRegExp\fR\'s are anonymous we can access them directly from the \fIparams\fR array\.180.181.IP "" 4182.183.nf184185app\.get(/^\\/users?(?:\\/(\\d+)(?:\\\.\\\.(\\d+))?)?/, function(req, res, params){186 res\.send(params\.captures);186 res\.send(params);187});188.189.fi190.
919 unmodified lines
modified:docs/guide.html+2 added-2 removed
338 unmodified lines
339<pre><code>\/user\/([^\/]+)\/?340</code></pre>341342<p>Regular expression literals may also be passed for complex uses. Since capture343groups with literal <em>RegExp</em>'s are anonymous we use the <em>params.captures</em> array.</p>343groups with literal <em>RegExp</em>'s are anonymous we can access them directly from the <em>params</em> array.</p>344345<pre><code>app.get(/^\/users?(?:\/(\d+)(?:\.\.(\d+))?)?/, function(req, res, params){346 res.send(params.captures);346 res.send(params);347});348</code></pre>349350<p>Curl requests against the previously defined route:</p>
605 unmodified lines
modified:docs/guide.md+2 added-2 removed
99 unmodified lines
100101 \/user\/([^\/]+)\/?102103Regular expression literals may also be passed for complex uses. Since capture104groups with literal _RegExp_'s are anonymous we use the _params.captures_ array.104groups with literal _RegExp_'s are anonymous we can access them directly from the _params_ array.105106 app.get(/^\/users?(?:\/(\d+)(?:\.\.(\d+))?)?/, function(req, res, params){107 res.send(params.captures);107 res.send(params);108 });109110Curl requests against the previously defined route:111
531 unmodified lines