Skip to content

Commit edbca5d

Browse files
committed
updated backward compatibility documentation
1 parent 7aff887 commit edbca5d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Readme.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -184,13 +184,13 @@ Path-To-RegExp exposes the two functions used internally that accept an array of
184184

185185
## Compatibility with Express <= 4.x
186186

187-
Path-To-RegExp breaks compatibility with Express <= 4.x in a few ways:
187+
Path-To-RegExp breaks compatibility with Express <= `4.x`:
188188

189-
* RegExp special characters can now be used in the regular path. E.g. `/user/(\\d+)`
190-
* All RegExp special characters can now be used inside the custom match. E.g. `/:user(.*)`
191-
* No more support for asterisk matching - use an explicit parameter instead. E.g. `/(.*)`
192-
* Parameters can have suffixes that augment meaning - `*`, `+` and `?`. E.g. `/:user*`
193-
* Strings aren't interpreted as literal regexp strings - no more non-capturing groups, lookaheads, lookbehinds or nested matching groups (but you can still pass a regexp manually)
189+
* No longer a direct conversion to a RegExp with sugar on top - it's a path matcher with named and unnamed matching groups
190+
* It's unlikely you previously abused this feature, it's rare and you could always use a RegExp instead
191+
* All matching RegExp special characters can be used in a matching group. E.g. `/:user(.*)`
192+
* Other RegExp features are not support - no nested matching groups, non-capturing groups or look aheads
193+
* Parameters have suffixes that augment meaning - `*`, `+` and `?`. E.g. `/:user*`
194194

195195
## Live Demo
196196

0 commit comments

Comments
 (0)