Skip to content

Commit 98ab888

Browse files
authored
Update example RegExp (#224)
1 parent 0c466b1 commit 98ab888

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const { pathToRegexp, match, parse, compile } = require("path-to-regexp");
4141
```javascript
4242
const keys = [];
4343
const regexp = pathToRegexp("/foo/:bar", keys);
44-
// regexp = /^\/foo\/([^\/]+?)\/?$/i
44+
// regexp = /^\/foo(?:\/([^\/#\?]+?))[\/#\?]?$/i
4545
// keys = [{ name: 'bar', prefix: '/', suffix: '', pattern: '[^\\/#\\?]+?', modifier: '' }]
4646
```
4747

0 commit comments

Comments
 (0)