You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure why, but parenthesis don't match when using named segments. Here's an example:
>constUrlPattern=require('url-pattern')undefined>constpattern=newUrlPattern('/pages/:pageName')undefined>pattern.match('/pages')null>pattern.match('/pages/Hello World'){pageName: 'Hello World'}>pattern.match('/pages/Hello World (Example)')null>pattern.match('/pages/Hello World {Example}')null
Is this intentional?
The text was updated successfully, but these errors were encountered:
I realised the docs are referring to the value and not the named segment itself!
when matching, a named segment consumes all characters in the regex character set a-zA-Z0-9-_~ %. a >named segment match stops at /, ., ... but not at _, -, , %...
you can change these character sets. click here to see how.
I'm not sure why, but parenthesis don't match when using named segments. Here's an example:
Is this intentional?
The text was updated successfully, but these errors were encountered: