Skip to content

Commit

Permalink
Merge pull request hapijs#475 from walmartlabs/user/eran
Browse files Browse the repository at this point in the history
Simplify path regex
  • Loading branch information
thegoleffect committed Feb 5, 2013
2 parents d320b2b + 2c4c97e commit 6b32314
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/route.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,8 @@ internals.Route.prototype._generateRegex = function () {
segmentRX += '((?:[^\\/]+)(?:\\/(?:[^\\/]+)){' + (multiCount - 1) + '})';
}
else {
segmentRX += '((?:[^\\/]+)(?:\\/(?:[^\\/]+))*\\/?)';
} // 12 23 4 43 1
segmentRX += '(.*)';
}
}
else {
segmentRX += '([^\\/]+)';
Expand Down

0 comments on commit 6b32314

Please sign in to comment.