The route from which the expression will be created.
Whether or not the expression should match a leading slash.
Whether or not the expression should match a trailing slash.
The reason this is false
by default is because these
expressions are often used to match against incoming requests,
and they don't have a trailing slash.
Given a server route definition, this function creates a regular expression to match it: The expression replaces the routes parameters with placeholders so it can be compared with real routes.